mirror of https://github.com/mgba-emu/mgba.git
Qt: Remember window position
This commit is contained in:
parent
e93240f90c
commit
3fe32281c9
1
CHANGES
1
CHANGES
|
@ -84,6 +84,7 @@ Misc:
|
|||
- 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:
|
||||
|
|
|
@ -79,6 +79,11 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
|
|||
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::resizeEvent(QResizeEvent*) {
|
|||
|
||||
void Window::closeEvent(QCloseEvent* event) {
|
||||
emit shutdown();
|
||||
m_config->setQtOption("windowPos", pos());
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue