all repos — mgba @ 3fe32281c9f419c0b14044153324624614d15208

mGBA Game Boy Advance Emulator

Qt: Remember window position
Jeffrey Pfau jeffrey@endrift.com
Sat, 28 Mar 2015 23:14:10 -0700
commit

3fe32281c9f419c0b14044153324624614d15208

parent

e93240f90c75a5f174efaf1647a18a8102ce95e5

2 files changed, 7 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -84,6 +84,7 @@ - All: Enable link-time optimization

- GBA Thread: Make GBASyncWaitFrameStart time out - GBA: Move A/V stream interface into core - GBA: Savestates now take into account savedata state machines (fixes #109) + - Qt: Remember window position 0.1.1: (2015-01-24) Bugfixes:
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -79,6 +79,11 @@ m_screenWidget->setPixmap(m_logo);

m_screenWidget->setLockAspectRatio(m_logo.width(), m_logo.height()); setCentralWidget(m_screenWidget); + QVariant windowPos = m_config->getQtOption("windowPos"); + if (!windowPos.isNull()) { + move(windowPos.toPoint()); + } + connect(m_controller, SIGNAL(gameStarted(GBAThread*)), this, SLOT(gameStarted(GBAThread*))); connect(m_controller, SIGNAL(gameStopped(GBAThread*)), m_display, SLOT(stopDrawing())); connect(m_controller, SIGNAL(gameStopped(GBAThread*)), this, SLOT(gameStopped()));

@@ -344,6 +349,7 @@ }

void Window::closeEvent(QCloseEvent* event) { emit shutdown(); + m_config->setQtOption("windowPos", pos()); QMainWindow::closeEvent(event); }