aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/frontend/qt_sdl/PlatformConfig.cpp6
-rw-r--r--src/frontend/qt_sdl/PlatformConfig.h1
-rw-r--r--src/frontend/qt_sdl/VideoSettingsDialog.cpp19
-rw-r--r--src/frontend/qt_sdl/VideoSettingsDialog.h7
4 files changed, 30 insertions, 3 deletions
diff --git a/src/frontend/qt_sdl/PlatformConfig.cpp b/src/frontend/qt_sdl/PlatformConfig.cpp
index 28c224d..03fd2ac 100644
--- a/src/frontend/qt_sdl/PlatformConfig.cpp
+++ b/src/frontend/qt_sdl/PlatformConfig.cpp
@@ -45,6 +45,7 @@ int ScreenFilter;
int ScreenUseGL;
int ScreenVSync;
+int ScreenVSyncInterval;
int LimitFPS;
int AudioSync;
@@ -124,8 +125,9 @@ ConfigEntry PlatformConfigFile[] =
{"IntegerScaling", 0, &IntegerScaling, 0, NULL, 0},
{"ScreenFilter", 0, &ScreenFilter, 1, NULL, 0},
- {"ScreenUseGL", 0, &ScreenUseGL, 1, NULL, 0},
- {"ScreenVSync", 0, &ScreenVSync, 0, NULL, 0},
+ {"ScreenUseGL", 0, &ScreenUseGL, 1, NULL, 0},
+ {"ScreenVSync", 0, &ScreenVSync, 0, NULL, 0},
+ {"ScreenVSyncInterval", 0, &ScreenVSyncInterval, 1, NULL, 0},
{"LimitFPS", 0, &LimitFPS, 0, NULL, 0},
{"AudioSync", 0, &AudioSync, 1, NULL, 0},
diff --git a/src/frontend/qt_sdl/PlatformConfig.h b/src/frontend/qt_sdl/PlatformConfig.h
index 539f9a4..cc288b6 100644
--- a/src/frontend/qt_sdl/PlatformConfig.h
+++ b/src/frontend/qt_sdl/PlatformConfig.h
@@ -58,6 +58,7 @@ extern int ScreenFilter;
extern int ScreenUseGL;
extern int ScreenVSync;
+extern int ScreenVSyncInterval;
extern int LimitFPS;
extern int AudioSync;
diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.cpp b/src/frontend/qt_sdl/VideoSettingsDialog.cpp
index c0ec42a..0aeb154 100644
--- a/src/frontend/qt_sdl/VideoSettingsDialog.cpp
+++ b/src/frontend/qt_sdl/VideoSettingsDialog.cpp
@@ -36,12 +36,29 @@ VideoSettingsDialog::VideoSettingsDialog(QWidget* parent) : QDialog(parent), ui(
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
- //
+ oldRenderer = Config::_3DRenderer;
+ oldGLDisplay = Config::ScreenUseGL;
+ oldVSync = Config::ScreenVSync;
+ oldVSyncInterval = Config::ScreenVSyncInterval;
+ oldSoftThreaded = Config::Threaded3D;
+ oldGLScale = Config::GL_ScaleFactor;
grp3DRenderer = new QButtonGroup(this);
grp3DRenderer->addButton(ui->rb3DSoftware, 0);
grp3DRenderer->addButton(ui->rb3DOpenGL, 1);
//connect(grp3DRenderer, SIGNAL(buttonClicked(int)), this, SLOT(onChange3DRenderer(int)));
+ grp3DRenderer->button(Config::_3DRenderer)->setChecked(true);
+
+ ui->cbGLDisplay->setChecked(Config::ScreenUseGL != 0);
+
+ ui->cbVSync->setChecked(Config::ScreenVSync != 0);
+ ui->sbVSyncInterval->setValue(Config::ScreenVSyncInterval);
+
+ ui->cbSoftwareThreaded->setChecked(Config::Threaded3D != 0);
+
+ for (int i = 1; i <= 16; i++)
+ ui->cbxGLResolution->addItem(QString("%1x native (%2x%3)").arg(i).arg(256*i).arg(192*i), QVariant(i));
+ ui->cbxGLResolution->setCurrentIndex(Config::GL_ScaleFactor);
}
VideoSettingsDialog::~VideoSettingsDialog()
diff --git a/src/frontend/qt_sdl/VideoSettingsDialog.h b/src/frontend/qt_sdl/VideoSettingsDialog.h
index d64cee2..05dfecb 100644
--- a/src/frontend/qt_sdl/VideoSettingsDialog.h
+++ b/src/frontend/qt_sdl/VideoSettingsDialog.h
@@ -61,6 +61,13 @@ private:
Ui::VideoSettingsDialog* ui;
QButtonGroup* grp3DRenderer;
+
+ int oldRenderer;
+ int oldGLDisplay;
+ int oldVSync;
+ int oldVSyncInterval;
+ int oldSoftThreaded;
+ int oldGLScale;
};
#endif // VIDEOSETTINGSDIALOG_H