mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-27 09:32:30 -06:00
frontend: Remove V-Sync option from UI
The V-Sync option is fundamentally broken in Citra, so let's do the same as yuzu and remove it entirely for SDL2 and at least from the frontend for QT. (It was also only used by 7.3% of users)
This commit is contained in:
parent
95a57a2fe3
commit
1302c9c1e7
10 changed files with 9 additions and 19 deletions
|
@ -121,7 +121,7 @@ void Config::ReadValues() {
|
|||
Settings::values.use_shader_jit = sdl2_config->GetBoolean("Renderer", "use_shader_jit", true);
|
||||
Settings::values.resolution_factor =
|
||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "resolution_factor", 1));
|
||||
Settings::values.use_vsync = sdl2_config->GetBoolean("Renderer", "use_vsync", false);
|
||||
Settings::values.vsync_enabled = sdl2_config->GetBoolean("Renderer", "vsync_enabled", false);
|
||||
Settings::values.use_frame_limit = sdl2_config->GetBoolean("Renderer", "use_frame_limit", true);
|
||||
Settings::values.frame_limit =
|
||||
static_cast<u16>(sdl2_config->GetInteger("Renderer", "frame_limit", 100));
|
||||
|
|
|
@ -119,7 +119,7 @@ resolution_factor =
|
|||
|
||||
# Whether to enable V-Sync (caps the framerate at 60FPS) or not.
|
||||
# 0 (default): Off, 1: On
|
||||
use_vsync =
|
||||
vsync_enabled =
|
||||
|
||||
# Turns on the frame limiter, which will limit frames output to the target game speed
|
||||
# 0: Off, 1: On (default)
|
||||
|
|
|
@ -163,7 +163,7 @@ EmuWindow_SDL2::EmuWindow_SDL2(bool fullscreen) {
|
|||
OnResize();
|
||||
OnMinimalClientAreaChangeRequest(GetActiveConfig().min_client_area_size);
|
||||
SDL_PumpEvents();
|
||||
SDL_GL_SetSwapInterval(Settings::values.use_vsync);
|
||||
SDL_GL_SetSwapInterval(Settings::values.vsync_enabled);
|
||||
LOG_INFO(Frontend, "Citra Version: {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch,
|
||||
Common::g_scm_desc);
|
||||
Settings::LogSettings();
|
||||
|
|
|
@ -315,7 +315,7 @@ void GRenderWindow::InitRenderTarget() {
|
|||
QGLFormat fmt;
|
||||
fmt.setVersion(3, 3);
|
||||
fmt.setProfile(QGLFormat::CoreProfile);
|
||||
fmt.setSwapInterval(Settings::values.use_vsync);
|
||||
fmt.setSwapInterval(Settings::values.vsync_enabled);
|
||||
|
||||
// Requests a forward-compatible context, which is required to get a 3.2+ context on OS X
|
||||
fmt.setOption(QGL::NoDeprecatedFunctions);
|
||||
|
|
|
@ -137,7 +137,7 @@ void Config::ReadValues() {
|
|||
Settings::values.use_shader_jit = ReadSetting("use_shader_jit", true).toBool();
|
||||
Settings::values.resolution_factor =
|
||||
static_cast<u16>(ReadSetting("resolution_factor", 1).toInt());
|
||||
Settings::values.use_vsync = ReadSetting("use_vsync", false).toBool();
|
||||
Settings::values.vsync_enabled = ReadSetting("vsync_enabled", false).toBool();
|
||||
Settings::values.use_frame_limit = ReadSetting("use_frame_limit", true).toBool();
|
||||
Settings::values.frame_limit = ReadSetting("frame_limit", 100).toInt();
|
||||
|
||||
|
@ -426,7 +426,7 @@ void Config::SaveValues() {
|
|||
WriteSetting("shaders_accurate_mul", Settings::values.shaders_accurate_mul, false);
|
||||
WriteSetting("use_shader_jit", Settings::values.use_shader_jit, true);
|
||||
WriteSetting("resolution_factor", Settings::values.resolution_factor, 1);
|
||||
WriteSetting("use_vsync", Settings::values.use_vsync, false);
|
||||
WriteSetting("vsync_enabled", Settings::values.vsync_enabled, false);
|
||||
WriteSetting("use_frame_limit", Settings::values.use_frame_limit, true);
|
||||
WriteSetting("frame_limit", Settings::values.frame_limit, 100);
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
|||
ui->setupUi(this);
|
||||
this->setConfiguration();
|
||||
|
||||
ui->toggle_vsync->setEnabled(!Core::System::GetInstance().IsPoweredOn());
|
||||
ui->frame_limit->setEnabled(Settings::values.use_frame_limit);
|
||||
connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit,
|
||||
&QSpinBox::setEnabled);
|
||||
|
@ -61,7 +60,6 @@ void ConfigureGraphics::setConfiguration() {
|
|||
ui->toggle_accurate_mul->setChecked(Settings::values.shaders_accurate_mul);
|
||||
ui->toggle_shader_jit->setChecked(Settings::values.use_shader_jit);
|
||||
ui->resolution_factor_combobox->setCurrentIndex(Settings::values.resolution_factor);
|
||||
ui->toggle_vsync->setChecked(Settings::values.use_vsync);
|
||||
ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit);
|
||||
ui->frame_limit->setValue(Settings::values.frame_limit);
|
||||
ui->factor_3d->setValue(Settings::values.factor_3d);
|
||||
|
@ -82,7 +80,6 @@ void ConfigureGraphics::applyConfiguration() {
|
|||
Settings::values.use_shader_jit = ui->toggle_shader_jit->isChecked();
|
||||
Settings::values.resolution_factor =
|
||||
static_cast<u16>(ui->resolution_factor_combobox->currentIndex());
|
||||
Settings::values.use_vsync = ui->toggle_vsync->isChecked();
|
||||
Settings::values.use_frame_limit = ui->toggle_frame_limit->isChecked();
|
||||
Settings::values.frame_limit = ui->frame_limit->value();
|
||||
Settings::values.factor_3d = ui->factor_3d->value();
|
||||
|
|
|
@ -20,13 +20,6 @@
|
|||
<string>General</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_vsync">
|
||||
<property name="text">
|
||||
<string>Enable V-Sync</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
|
|
@ -73,7 +73,7 @@ void LogSettings() {
|
|||
LogSetting("Renderer_ShadersAccurateMul", Settings::values.shaders_accurate_mul);
|
||||
LogSetting("Renderer_UseShaderJit", Settings::values.use_shader_jit);
|
||||
LogSetting("Renderer_UseResolutionFactor", Settings::values.resolution_factor);
|
||||
LogSetting("Renderer_UseVsync", Settings::values.use_vsync);
|
||||
LogSetting("Renderer_VsyncEnabled", Settings::values.vsync_enabled);
|
||||
LogSetting("Renderer_UseFrameLimit", Settings::values.use_frame_limit);
|
||||
LogSetting("Renderer_FrameLimit", Settings::values.frame_limit);
|
||||
LogSetting("Layout_Toggle3d", Settings::values.toggle_3d);
|
||||
|
|
|
@ -135,7 +135,7 @@ struct Values {
|
|||
bool shaders_accurate_mul;
|
||||
bool use_shader_jit;
|
||||
u16 resolution_factor;
|
||||
bool use_vsync;
|
||||
bool vsync_enabled;
|
||||
bool use_frame_limit;
|
||||
u16 frame_limit;
|
||||
|
||||
|
|
|
@ -177,7 +177,7 @@ TelemetrySession::TelemetrySession() {
|
|||
Settings::values.shaders_accurate_mul);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseShaderJit",
|
||||
Settings::values.use_shader_jit);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.use_vsync);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_UseVsync", Settings::values.vsync_enabled);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_Toggle3d", Settings::values.toggle_3d);
|
||||
AddField(Telemetry::FieldType::UserConfig, "Renderer_Factor3d", Settings::values.factor_3d);
|
||||
AddField(Telemetry::FieldType::UserConfig, "System_IsNew3ds", Settings::values.is_new_3ds);
|
||||
|
|
Loading…
Reference in a new issue