all repos — mgba @ c549db69f1774b4b06edb3b555b53c682ec43a49

mGBA Game Boy Advance Emulator

Qt: Only reset window dimensions when first shown
Jeffrey Pfau jeffrey@endrift.com
Mon, 31 Oct 2016 10:46:57 -0700
commit

c549db69f1774b4b06edb3b555b53c682ec43a49

parent

5c15ed7dd536541700014f71f53a7f4cb00240fd

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

jump to
M CHANGESCHANGES

@@ -23,6 +23,7 @@ - GB Memory: Fix patching ROM bank 0

- GB: Fix audio not being deinitialized - GBA Memory: Fix VCOUNT being writable - GBA Memory: Improve initial skipped BIOS state + - Qt: Only reset window dimensions when first shown Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -79,6 +79,7 @@ , m_mruMenu(nullptr)

, m_shortcutController(new ShortcutController(this)) , m_fullscreenOnStart(false) , m_autoresume(false) + , m_wasOpened(false) { setFocusPolicy(Qt::StrongFocus); setAcceptDrops(true);

@@ -583,6 +584,10 @@ m_config->setOption("fullscreen", isFullScreen());

} void Window::showEvent(QShowEvent* event) { + if (m_wasOpened) { + return; + } + m_wasOpened = true; resizeFrame(m_screenWidget->sizeHint()); QVariant windowPos = m_config->getQtOption("windowPos"); if (!windowPos.isNull()) {
M src/platform/qt/Window.hsrc/platform/qt/Window.h

@@ -178,6 +178,7 @@ ShaderSelector* m_shaderView;

bool m_fullscreenOnStart; QTimer m_focusCheck; bool m_autoresume; + bool m_wasOpened; bool m_hitUnimplementedBiosCall;