yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

qt: Add an option to settings for enabling V-Sync.

This commit is contained in:
bunnei 2016-08-29 21:29:58 -04:00
parent 02702c6605
commit 74842116b2
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
#include "ui_configure_graphics.h" #include "ui_configure_graphics.h"
#include "core/settings.h" #include "core/settings.h"
#include "core/system.h"
ConfigureGraphics::ConfigureGraphics(QWidget *parent) : ConfigureGraphics::ConfigureGraphics(QWidget *parent) :
QWidget(parent), QWidget(parent),
@ -13,6 +14,8 @@ ConfigureGraphics::ConfigureGraphics(QWidget *parent) :
{ {
ui->setupUi(this); ui->setupUi(this);
this->setConfiguration(); this->setConfiguration();
ui->toogle_vsync->setEnabled(!System::IsPoweredOn());
} }
ConfigureGraphics::~ConfigureGraphics() { ConfigureGraphics::~ConfigureGraphics() {
@ -28,6 +31,7 @@ void ConfigureGraphics::setConfiguration() {
void ConfigureGraphics::applyConfiguration() { void ConfigureGraphics::applyConfiguration() {
Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked(); Settings::values.use_hw_renderer = ui->toogle_hw_renderer->isChecked();
Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked(); Settings::values.use_shader_jit = ui->toogle_shader_jit->isChecked();
Settings::values.use_scaled_resolution = ui->toogle_scaled_resolution->isChecked();
Settings::values.use_vsync = ui->toogle_vsync->isChecked(); Settings::values.use_vsync = ui->toogle_vsync->isChecked();
Settings::Apply(); Settings::Apply();
} }