]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/mainwin.cpp
Fixed limits on cartridge space from 4MB to 6MB.
[virtualjaguar] / src / gui / mainwin.cpp
index 1c990faec8337d5a7c038907150cbce48a524a51..b17ef8d91e923b709fa28259a668416602058b4a 100644 (file)
@@ -24,7 +24,7 @@
 // - Remove SDL dependencies (sound, mainly) from Jaguar core lib
 // - Fix inconsistency with trailing slashes in paths (eeproms needs one, software doesn't)
 //
-// SFDX CODE: 9XF9TUHFM2359
+// SFDX CODE: S1E9T8H5M23YS
 
 // Uncomment this for debugging...
 //#define DEBUG
@@ -403,12 +403,22 @@ void MainWin::closeEvent(QCloseEvent * event)
 
 void MainWin::keyPressEvent(QKeyEvent * e)
 {
+       // From jaguar.cpp
+       extern bool startM68KTracing;
+
        // We ignore the Alt key for now, since it causes problems with the GUI
        if (e->key() == Qt::Key_Alt)
        {
                e->accept();
                return;
        }
+       else if (e->key() == Qt::Key_F11)
+       {
+               startM68KTracing = true;
+               e->accept();
+               return;
+       }
+
 /*
        if (e->key() == Qt::Key_F9)
        {
@@ -865,8 +875,14 @@ void MainWin::SetFullScreen(bool state/*= true*/)
 //             mainWinSize = size();
                menuBar()->hide();
                statusBar()->hide();
+               x1Act->setDisabled(true);
+               x2Act->setDisabled(true);
+               x3Act->setDisabled(true);
                showFullScreen();
-               QRect r = QApplication::desktop()->availableGeometry();
+               // This is needed because the fullscreen may happen on a different
+               // screen than screen 0:
+               int screenNum = QApplication::desktop()->screenNumber(videoWidget);
+               QRect r = QApplication::desktop()->availableGeometry(screenNum);
 //             double targetWidth = 320.0, targetHeight = (vjs.hardwareTypeNTSC ? 240.0 : 256.0);
                double targetWidth = (double)VIRTUAL_SCREEN_WIDTH,
                        targetHeight = (double)(vjs.hardwareTypeNTSC ? VIRTUAL_SCREEN_HEIGHT_NTSC : VIRTUAL_SCREEN_HEIGHT_PAL);
@@ -887,6 +903,9 @@ void MainWin::SetFullScreen(bool state/*= true*/)
                // Reset the video widget to windowed mode
                videoWidget->offset = 0;
                videoWidget->fullscreen = false;
+               x1Act->setDisabled(false);
+               x2Act->setDisabled(false);
+               x3Act->setDisabled(false);
                menuBar()->show();
                statusBar()->show();
                showNormal();