all repos — mgba @ cab9f3343b64865761243cf3014cbcb4d6771c56

mGBA Game Boy Advance Emulator

Qt: Double-clicking on the window toggles full screen
Jeffrey Pfau jeffrey@endrift.com
Sun, 29 Mar 2015 17:12:39 -0700
commit

cab9f3343b64865761243cf3014cbcb4d6771c56

parent

3a3b7dffdb9e69763a9567119e45312d4b1453df

3 files changed, 9 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -85,6 +85,7 @@ - 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 + - Qt: Double-clicking on the window toggles full screen 0.1.1: (2015-01-24) Bugfixes:
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -385,6 +385,13 @@ event->accept();

m_controller->loadGame(url.path()); } +void Window::mouseDoubleClickEvent(QMouseEvent* event) { + if (event->button() != Qt::LeftButton) { + return; + } + toggleFullScreen(); +} + void Window::enterFullScreen() { if (isFullScreen()) { return;
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -97,6 +97,7 @@ virtual void closeEvent(QCloseEvent*) override;

virtual void focusOutEvent(QFocusEvent*) override; virtual void dragEnterEvent(QDragEnterEvent*) override; virtual void dropEvent(QDropEvent*) override; + virtual void mouseDoubleClickEvent(QMouseEvent*) override; private slots: void gameStarted(GBAThread*);