]> Shamusworld >> Repos - virtualjaguar/blobdiff - src/gui/mainwin.cpp
Fixed fullscreen mode, shrunk screen width.
[virtualjaguar] / src / gui / mainwin.cpp
index 88b4d19e160e201a4e2876f8d104e480fa27ef0b..1c990faec8337d5a7c038907150cbce48a524a51 100644 (file)
@@ -874,12 +874,19 @@ void MainWin::SetFullScreen(bool state/*= true*/)
                // NOTE: Really should check here to see which dimension constrains the other.
                //       Right now, we assume that height is the constraint.
                int newWidth = (int)(aspectRatio * (double)r.height());
+               videoWidget->offset = (r.width() - newWidth) / 2;
+               videoWidget->fullscreen = true;
+               videoWidget->outputWidth = newWidth;
 
-               videoWidget->setFixedSize(newWidth, r.height());
+//             videoWidget->setFixedSize(newWidth, r.height());
+               videoWidget->setFixedSize(r.width(), r.height());
                showFullScreen();
        }
        else
        {
+               // Reset the video widget to windowed mode
+               videoWidget->offset = 0;
+               videoWidget->fullscreen = false;
                menuBar()->show();
                statusBar()->show();
                showNormal();