Added logic for auto-resume play menu item.
This commit is contained in:
parent
46271dfa61
commit
d87b5c7ab7
|
@ -2,6 +2,7 @@
|
||||||
//
|
//
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
||||||
|
#include "../../fceu.h"
|
||||||
#include "Qt/main.h"
|
#include "Qt/main.h"
|
||||||
#include "Qt/dface.h"
|
#include "Qt/dface.h"
|
||||||
#include "Qt/input.h"
|
#include "Qt/input.h"
|
||||||
|
@ -154,7 +155,7 @@ void consoleWin_t::createMainMenu(void)
|
||||||
// Options -> Video Config
|
// Options -> Video Config
|
||||||
gameVideoConfig = new QAction(tr("Video Config"), this);
|
gameVideoConfig = new QAction(tr("Video Config"), this);
|
||||||
//gameVideoConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
//gameVideoConfig->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
gameVideoConfig->setStatusTip(tr("Video Configure"));
|
gameVideoConfig->setStatusTip(tr("Video Preferences"));
|
||||||
connect(gameVideoConfig, SIGNAL(triggered()), this, SLOT(openGameVideoConfWin(void)) );
|
connect(gameVideoConfig, SIGNAL(triggered()), this, SLOT(openGameVideoConfWin(void)) );
|
||||||
|
|
||||||
optMenu->addAction(gameVideoConfig);
|
optMenu->addAction(gameVideoConfig);
|
||||||
|
@ -167,6 +168,15 @@ void consoleWin_t::createMainMenu(void)
|
||||||
|
|
||||||
optMenu->addAction(hotkeyConfig);
|
optMenu->addAction(hotkeyConfig);
|
||||||
|
|
||||||
|
// Options -> Auto-Resume
|
||||||
|
autoResume = new QAction(tr("Auto-Resume Play"), this);
|
||||||
|
//autoResume->setShortcut( QKeySequence(tr("Ctrl+C")));
|
||||||
|
autoResume->setCheckable(true);
|
||||||
|
autoResume->setStatusTip(tr("Auto-Resume Play"));
|
||||||
|
connect(autoResume, SIGNAL(triggered()), this, SLOT(toggleAutoResume(void)) );
|
||||||
|
|
||||||
|
optMenu->addAction(autoResume);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Help
|
// Help
|
||||||
helpMenu = menuBar()->addMenu(tr("Help"));
|
helpMenu = menuBar()->addMenu(tr("Help"));
|
||||||
|
@ -321,6 +331,15 @@ void consoleWin_t::openHotkeyConfWin(void)
|
||||||
//printf("Hotkey Config Window Destroyed\n");
|
//printf("Hotkey Config Window Destroyed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void consoleWin_t::toggleAutoResume(void)
|
||||||
|
{
|
||||||
|
//printf("Auto Resume: %i\n", autoResume->isChecked() );
|
||||||
|
|
||||||
|
g_config->setOption ("SDL.AutoResume", (int) autoResume->isChecked() );
|
||||||
|
|
||||||
|
AutoResumePlay = autoResume->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
void consoleWin_t::aboutQPlot(void)
|
void consoleWin_t::aboutQPlot(void)
|
||||||
{
|
{
|
||||||
printf("About QPlot\n");
|
printf("About QPlot\n");
|
||||||
|
|
|
@ -58,6 +58,7 @@ class consoleWin_t : public QMainWindow
|
||||||
QAction *gameSoundConfig;
|
QAction *gameSoundConfig;
|
||||||
QAction *gameVideoConfig;
|
QAction *gameVideoConfig;
|
||||||
QAction *hotkeyConfig;
|
QAction *hotkeyConfig;
|
||||||
|
QAction *autoResume;
|
||||||
QAction *aboutAct;
|
QAction *aboutAct;
|
||||||
|
|
||||||
QTimer *gameTimer;
|
QTimer *gameTimer;
|
||||||
|
@ -82,6 +83,7 @@ class consoleWin_t : public QMainWindow
|
||||||
void openGameSndConfWin(void);
|
void openGameSndConfWin(void);
|
||||||
void openGameVideoConfWin(void);
|
void openGameVideoConfWin(void);
|
||||||
void openHotkeyConfWin(void);
|
void openHotkeyConfWin(void);
|
||||||
|
void toggleAutoResume(void);
|
||||||
void updatePeriodic(void);
|
void updatePeriodic(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue