From 3ac471eb2f737d2aca93a456b638631af4e68c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Miko=C5=82ajczyk?= Date: Wed, 13 Feb 2013 23:08:55 +0100 Subject: [PATCH] Rearrangement of Qt menu --- Qt/mainwindow.cpp | 16 ++++++ Qt/mainwindow.h | 4 ++ Qt/mainwindow.ui | 127 +++++++++++++++++++++++++++++----------------- 3 files changed, 101 insertions(+), 46 deletions(-) diff --git a/Qt/mainwindow.cpp b/Qt/mainwindow.cpp index 057463968a..c951d70f53 100644 --- a/Qt/mainwindow.cpp +++ b/Qt/mainwindow.cpp @@ -250,6 +250,8 @@ void MainWindow::UpdateMenus() ui->action_AF16x->setChecked(g_Config.iAnisotropyLevel == 16); ui->action_Simple_2xAA->setChecked(g_Config.SSAntiAliasing); ui->action_Show_FPS_counter->setChecked(g_Config.bShowFPSCounter); + ui->action_Stretch_to_display->setChecked(g_Config.bStretchToDisplay); + ui->action_Sound->setChecked(g_Config.bEnableSound); bool enable = !Core_IsStepping() ? false : true; ui->action_EmulationRun->setEnabled(g_State.bEmuThreadStarted ? enable : false); @@ -1011,3 +1013,17 @@ void MainWindow::on_action_Show_FPS_counter_triggered() g_Config.bShowFPSCounter = !g_Config.bShowFPSCounter; UpdateMenus(); } + +void MainWindow::on_action_Stretch_to_display_triggered() +{ + g_Config.bStretchToDisplay = !g_Config.bStretchToDisplay; + UpdateMenus(); + if (gpu) + gpu->Resized(); +} + +void MainWindow::on_action_Sound_triggered() +{ + g_Config.bEnableSound = !g_Config.bEnableSound; + UpdateMenus(); +} diff --git a/Qt/mainwindow.h b/Qt/mainwindow.h index 81603a641f..9b83c867ae 100644 --- a/Qt/mainwindow.h +++ b/Qt/mainwindow.h @@ -167,6 +167,10 @@ private slots: void on_action_Show_FPS_counter_triggered(); + void on_action_Stretch_to_display_triggered(); + + void on_action_Sound_triggered(); + private: void loadLanguage(const QString &language); void createLanguageMenu(); diff --git a/Qt/mainwindow.ui b/Qt/mainwindow.ui index 78eeedfad9..a167aad884 100644 --- a/Qt/mainwindow.ui +++ b/Qt/mainwindow.ui @@ -71,10 +71,6 @@ - - - - @@ -96,7 +92,7 @@ - &Log Levels + Lo&g Levels @@ -130,54 +126,77 @@ - - - Zoom - - - - - - - Language + &Language - + - Anisotropic filtering + &Video - - - - - + + + &Anisotropic filtering + + + + + + + + + + &Zoom + + + + + + + + + + + + + + + + + + + - - + + + Co&ntrols + + + + + + + &Core + + + + + + + + + + + + - - - - - - - - - - - - - - - @@ -339,12 +358,12 @@ - Keyboard &Controls + &Keyboard - &Toggle Full Screen + &Toggle fullscreen F12 @@ -401,7 +420,7 @@ true - &Show Debug Statistics + Show &debug statistics @@ -461,7 +480,7 @@ true - &Ignore illegal reads/writes + I&gnore illegal reads/writes @@ -580,12 +599,12 @@ - GamePad Controls + &Gamepad - &Run on load + Run on loa&d @@ -659,7 +678,23 @@ true - Show FPS counter + Show &FPS counter + + + + + true + + + S&tretch to display + + + + + true + + + &Sound emulation