Added set frame advance delay menu and input dialog logic for Qt GUI.
This commit is contained in:
parent
8b5e99909a
commit
da0ab1359c
|
@ -534,6 +534,16 @@ void consoleWin_t::createMainMenu(void)
|
|||
act->setStatusTip(tr("Custom"));
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(emuCustomSpd(void)) );
|
||||
|
||||
subMenu->addAction(act);
|
||||
|
||||
subMenu->addSeparator();
|
||||
|
||||
// Emulation -> Speed -> Set Frame Advance Delay
|
||||
act = new QAction(tr("Set Frame Advance Delay"), this);
|
||||
//act->setShortcut( QKeySequence(tr("-")));
|
||||
act->setStatusTip(tr("Set Frame Advance Delay"));
|
||||
connect(act, SIGNAL(triggered()), this, SLOT(emuSetFrameAdvDelay(void)) );
|
||||
|
||||
subMenu->addAction(act);
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
@ -1429,6 +1439,27 @@ void consoleWin_t::emuCustomSpd(void)
|
|||
}
|
||||
}
|
||||
|
||||
void consoleWin_t::emuSetFrameAdvDelay(void)
|
||||
{
|
||||
int ret;
|
||||
QInputDialog dialog(this);
|
||||
|
||||
dialog.setWindowTitle( tr("Frame Advance Delay") );
|
||||
dialog.setLabelText( tr("How much time should elapse before holding the frame advance unpauses the simulation?") );
|
||||
dialog.setOkButtonText( tr("Ok") );
|
||||
dialog.setInputMode( QInputDialog::IntInput );
|
||||
dialog.setIntRange( 0, 1000 );
|
||||
dialog.setIntValue( frameAdvance_Delay );
|
||||
|
||||
dialog.show();
|
||||
ret = dialog.exec();
|
||||
|
||||
if ( QDialog::Accepted == ret )
|
||||
{
|
||||
frameAdvance_Delay = dialog.intValue();
|
||||
}
|
||||
}
|
||||
|
||||
void consoleWin_t::openMovie(void)
|
||||
{
|
||||
int ret, useNativeFileDialogVal;
|
||||
|
|
|
@ -172,6 +172,7 @@ class consoleWin_t : public QMainWindow
|
|||
void emuNormalSpd(void);
|
||||
void emuFastestSpd(void);
|
||||
void emuCustomSpd(void);
|
||||
void emuSetFrameAdvDelay(void);
|
||||
void openPPUViewer(void);
|
||||
void openNTViewer(void);
|
||||
void openCheats(void);
|
||||
|
|
|
@ -69,6 +69,7 @@ extern uint8 qtaintramreg;
|
|||
|
||||
extern uint8 *RAM; //shared memory modifications
|
||||
extern int EmulationPaused;
|
||||
extern int frameAdvance_Delay;
|
||||
|
||||
uint8 FCEU_ReadRomByte(uint32 i);
|
||||
void FCEU_WriteRomByte(uint32 i, uint8 value);
|
||||
|
|
Loading…
Reference in New Issue