Skip to content

Commit

Permalink
do not restore fullscreen state from saved geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
RSDuck committed Oct 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent aa443c8 commit d2ce403
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/frontend/qt_sdl/Window.cpp
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@
#include "EmuInstance.h"
#include "ArchiveUtil.h"
#include "CameraManager.h"
#include "Window.h"

using namespace melonDS;

@@ -261,6 +262,7 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
setAttribute(Qt::WA_DeleteOnClose);
setAcceptDrops(true);
setFocusPolicy(Qt::ClickFocus);
//setWindowState(Qt::window)

QMenuBar* menubar = new QMenuBar();
{
@@ -666,6 +668,8 @@ MainWindow::MainWindow(int id, EmuInstance* inst, QWidget* parent) :
QByteArray dec = QByteArray::fromBase64(raw, QByteArray::Base64Encoding | QByteArray::AbortOnBase64DecodingErrors);
if (!dec.isEmpty())
restoreGeometry(dec);
// if the window was closed in fullscreen do not restore this
setWindowState(windowState() & ~Qt::WindowFullScreen);
}
show();

0 comments on commit d2ce403

Please sign in to comment.