Qt: Only reset window dimensions when first shown

This commit is contained in:
Jeffrey Pfau 2016-10-31 10:46:57 -07:00
parent 5c15ed7dd5
commit c549db69f1
3 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Bugfixes:
- 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

View File

@ -79,6 +79,7 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
, m_shortcutController(new ShortcutController(this))
, m_fullscreenOnStart(false)
, m_autoresume(false)
, m_wasOpened(false)
{
setFocusPolicy(Qt::StrongFocus);
setAcceptDrops(true);
@ -583,6 +584,10 @@ void Window::resizeEvent(QResizeEvent* event) {
}
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()) {

View File

@ -178,6 +178,7 @@ private:
bool m_fullscreenOnStart;
QTimer m_focusCheck;
bool m_autoresume;
bool m_wasOpened;
bool m_hitUnimplementedBiosCall;