Remove old code to hide VSync in prefs for old SDL versions.
It was for the software renderer, and is no longer relevant as hardware rendering has been enabled exclusively.
This commit is contained in:
parent
bef4ceba4f
commit
a0daa2ddce
3 changed files with 9 additions and 6 deletions
|
@ -484,9 +484,6 @@ void preferences_dialog::post_build(window& window)
|
|||
|
||||
/* VSYNC */
|
||||
register_bool("vsync", true, vsync, set_vsync);
|
||||
if(!CVideo::get_singleton().supports_vsync()) {
|
||||
find_widget<widget>(&window, "vsync", false).set_visible(gui2::widget::visibility::invisible);
|
||||
}
|
||||
|
||||
/* SELECT THEME */
|
||||
connect_signal_mouse_left_click(
|
||||
|
|
|
@ -393,7 +393,7 @@ void CVideo::init_window()
|
|||
|
||||
uint32_t renderer_flags = SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE;
|
||||
|
||||
if(/*supports_vsync() &&*/ preferences::vsync()) {
|
||||
if(preferences::vsync()) {
|
||||
LOG_DP << "VSYNC on\n";
|
||||
renderer_flags |= SDL_RENDERER_PRESENTVSYNC;
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ bool CVideo::is_fullscreen() const
|
|||
return (window->get_flags() & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0;
|
||||
}
|
||||
|
||||
bool CVideo::supports_vsync() const
|
||||
bool CVideo::supports_software_vsync() const
|
||||
{
|
||||
return sdl_get_version() >= version_info{2, 0, 17};
|
||||
}
|
||||
|
|
|
@ -120,7 +120,13 @@ public:
|
|||
|
||||
bool is_fullscreen() const;
|
||||
|
||||
bool supports_vsync() const;
|
||||
/**
|
||||
* Only recent versions of SDL support vsync with the software renderer.
|
||||
* This is irrelevant now as we're using hardware rendering exclusively.
|
||||
* I recommend removing this function entirely after several months,
|
||||
* when it has become clear that the software renderer won't be needed.
|
||||
*/
|
||||
bool supports_software_vsync() const;
|
||||
|
||||
/**
|
||||
* Set the window resolution.
|
||||
|
|
Loading…
Add table
Reference in a new issue