Merge pull request #12011 from sonninnos/video-resolution

Screen Resolution option fixes
This commit is contained in:
Autechre 2021-02-16 22:15:55 +01:00 committed by GitHub
commit dea73a5595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -6173,7 +6173,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

@ -30455,6 +30455,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);
}
/**