1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-25 22:09:35 +00:00

Support VSync option in GUI.

Up config version.
This commit is contained in:
Sergey Lipskiy 2017-02-20 14:24:28 +07:00
parent 4881891483
commit 8ee43ea611
3 changed files with 6 additions and 1 deletions

View File

@ -4,7 +4,7 @@
#include <string>
#include "Types.h"
#define CONFIG_VERSION_CURRENT 16U
#define CONFIG_VERSION_CURRENT 17U
#define BILINEAR_3POINT 0
#define BILINEAR_STANDARD 1

View File

@ -124,6 +124,7 @@ void ConfigDialog::_init()
ui->aliasingLabelVal->setText(QString::number(config.video.multisampling));
ui->anisotropicSlider->setValue(config.texture.maxAnisotropy);
ui->cacheSizeSpinBox->setValue(config.texture.maxBytes / gc_uMegabyte);
ui->vSyncCheckBox->setChecked(config.video.verticalSync != 0);
switch (config.texture.bilinearMode) {
case BILINEAR_3POINT:
@ -396,6 +397,8 @@ void ConfigDialog::accept()
config.translationFile = translationFiles[lanuageIndex-1].toLocal8Bit().constData();
}
config.video.verticalSync = ui->vSyncCheckBox->isChecked() ? 1 : 0;
// Emulation settings
config.generalEmulation.enableLOD = ui->emulateLodCheckBox->isChecked() ? 1 : 0;
config.generalEmulation.enableNoise = ui->emulateNoiseCheckBox->isChecked() ? 1 : 0;

View File

@ -26,6 +26,7 @@ void _loadSettings(QSettings & settings)
config.video.windowedHeight = settings.value("windowedHeight", config.video.windowedHeight).toInt();
config.video.fullscreenRefresh = settings.value("fullscreenRefresh", config.video.fullscreenRefresh).toInt();
config.video.multisampling = settings.value("multisampling", config.video.multisampling).toInt();
config.video.verticalSync = settings.value("verticalSync", config.video.verticalSync).toInt();
config.video.cropMode = settings.value("cropMode", config.video.cropMode).toInt();
config.video.cropWidth = settings.value("cropWidth", config.video.cropWidth).toInt();
config.video.cropHeight = settings.value("cropHeight", config.video.cropHeight).toInt();
@ -152,6 +153,7 @@ void writeSettings(const QString & _strIniFolder)
settings.setValue("windowedHeight", config.video.windowedHeight);
settings.setValue("fullscreenRefresh", config.video.fullscreenRefresh);
settings.setValue("multisampling", config.video.multisampling);
settings.setValue("verticalSync", config.video.verticalSync);
settings.setValue("cropMode", config.video.cropMode);
settings.setValue("cropWidth", config.video.cropWidth);
settings.setValue("cropHeight", config.video.cropHeight);