Added screen shot menu function.

This commit is contained in:
Matthew Budd 2020-07-11 10:29:03 -04:00
parent 0188c11e8b
commit b830e0aae5
2 changed files with 17 additions and 0 deletions

View File

@ -221,6 +221,14 @@ void consoleWin_t::createMainMenu(void)
loadLuaAct = NULL;
#endif
// File -> Screenshort
scrShotAct = new QAction(tr("Screenshot"), this);
scrShotAct->setShortcut( QKeySequence(tr("F12")));
scrShotAct->setStatusTip(tr("Screenshot"));
connect(scrShotAct, SIGNAL(triggered()), this, SLOT(takeScreenShot()));
fileMenu->addAction(scrShotAct);
// File -> Quit
quitAct = new QAction(tr("Quit"), this);
quitAct->setShortcut( QKeySequence(tr("Ctrl+Q")));
@ -601,6 +609,13 @@ void consoleWin_t::changeState9(void)
fceuWrapperUnLock();
}
void consoleWin_t::takeScreenShot(void)
{
fceuWrapperLock();
FCEUI_SaveSnapshot();
fceuWrapperUnLock();
}
void consoleWin_t::loadLua(void)
{
#ifdef _S9XLUA_H

View File

@ -59,6 +59,7 @@ class consoleWin_t : public QMainWindow
QAction *quickLoadAct;
QAction *quickSaveAct;
QAction *loadLuaAct;
QAction *scrShotAct;
QAction *quitAct;
QAction *gamePadConfig;
QAction *gameSoundConfig;
@ -110,6 +111,7 @@ class consoleWin_t : public QMainWindow
void changeState8(void);
void changeState9(void);
void loadLua(void);
void takeScreenShot(void);
};