Screen Resolution option fixes

This commit is contained in:
sonninnos 2021-02-09 15:33:49 +02:00
parent 68027c606e
commit 371453623b
3 changed files with 10 additions and 1 deletions

View File

@ -249,6 +249,10 @@ static bool gfx_ctx_w_vk_set_video_mode(void *data,
RARCH_ERR("[WGL]: win32_set_video_mode failed.\n");
goto error;
}
else
/* This is required for fullscreen mailbox
* not to crash after refresh rate change */
vulkan_create_swapchain(&win32_vk, width, height, win32_vk_interval);
gfx_ctx_w_vk_swap_interval(data, win32_vk_interval);
return true;

View File

@ -6036,7 +6036,7 @@ int action_cb_push_dropdown_item_resolution(const char *path,
settings->uints.video_fullscreen_x = width;
settings->uints.video_fullscreen_y = height;
return 1;
return action_cancel_pop_default(NULL, NULL, 0, 0);
}
return 0;

View File

@ -30469,6 +30469,11 @@ void video_monitor_set_refresh_rate(float hz)
configuration_set_float(settings,
settings->floats.video_refresh_rate,
hz);
/* Without CMD_EVENT_REINIT vulkan will not switch rate properly,
* and with other drivers it prevents switching properly.. */
if (string_is_equal(settings->arrays.video_driver, "vulkan"))
command_event(CMD_EVENT_REINIT, NULL);
}
/**