]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/mainwin.cpp
Video rendering now has correct timing per frame, in both NTSC and PAL mode.
[virtualjaguar] / src / gui / mainwin.cpp
index 7abc8c75509405412af2f2e2f8b606c159aeee30..af1dab100837dae93376b6338a0c671ccb288e2a 100644 (file)
@@ -185,6 +185,10 @@ MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(
        useCDAct->setCheckable(true);
        connect(useCDAct, SIGNAL(triggered()), this, SLOT(ToggleCDUsage()));
 
+       frameAdvanceAct = new QAction(QIcon(":/res/generic.png"), tr("&Frame Advance"), this);
+       frameAdvanceAct->setShortcut(QKeySequence(tr("F7")));
+       connect(frameAdvanceAct, SIGNAL(triggered()), this, SLOT(FrameAdvance()));
+
        // Misc. connections...
        connect(filePickWin, SIGNAL(RequestLoad(QString)), this, SLOT(LoadSoftware(QString)));
        connect(filePickWin, SIGNAL(FilePickerHiding()), this, SLOT(Unpause()));
@@ -194,6 +198,7 @@ MainWin::MainWin(): running(true), powerButtonOn(false), showUntunedTankCircuit(
        fileMenu = menuBar()->addMenu(tr("&Jaguar"));
        fileMenu->addAction(powerAct);
        fileMenu->addAction(pauseAct);
+       fileMenu->addAction(frameAdvanceAct);
        fileMenu->addAction(filePickAct);
        fileMenu->addAction(useCDAct);
        fileMenu->addAction(configAct);
@@ -640,6 +645,14 @@ void MainWin::ToggleCDUsage(void)
 #endif
 }
 
+void MainWin::FrameAdvance(void)
+{
+//printf("Frame Advance...\n");
+       // Execute 1 frame, then exit (only useful in Pause mode)
+       JaguarExecuteNew();
+       videoWidget->updateGL();
+}
+
 void MainWin::ResizeMainWindow(void)
 {
        videoWidget->setFixedSize(zoomLevel * 320, zoomLevel * (vjs.hardwareTypeNTSC ? 240 : 256));