mirror of https://github.com/mgba-emu/mgba.git
Qt: Only reset window dimensions when first shown
This commit is contained in:
parent
5c15ed7dd5
commit
c549db69f1
1
CHANGES
1
CHANGES
|
@ -23,6 +23,7 @@ Bugfixes:
|
||||||
- GB: Fix audio not being deinitialized
|
- GB: Fix audio not being deinitialized
|
||||||
- GBA Memory: Fix VCOUNT being writable
|
- GBA Memory: Fix VCOUNT being writable
|
||||||
- GBA Memory: Improve initial skipped BIOS state
|
- GBA Memory: Improve initial skipped BIOS state
|
||||||
|
- Qt: Only reset window dimensions when first shown
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -79,6 +79,7 @@ Window::Window(ConfigController* config, int playerId, QWidget* parent)
|
||||||
, m_shortcutController(new ShortcutController(this))
|
, m_shortcutController(new ShortcutController(this))
|
||||||
, m_fullscreenOnStart(false)
|
, m_fullscreenOnStart(false)
|
||||||
, m_autoresume(false)
|
, m_autoresume(false)
|
||||||
|
, m_wasOpened(false)
|
||||||
{
|
{
|
||||||
setFocusPolicy(Qt::StrongFocus);
|
setFocusPolicy(Qt::StrongFocus);
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
@ -583,6 +584,10 @@ void Window::resizeEvent(QResizeEvent* event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::showEvent(QShowEvent* event) {
|
void Window::showEvent(QShowEvent* event) {
|
||||||
|
if (m_wasOpened) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
m_wasOpened = true;
|
||||||
resizeFrame(m_screenWidget->sizeHint());
|
resizeFrame(m_screenWidget->sizeHint());
|
||||||
QVariant windowPos = m_config->getQtOption("windowPos");
|
QVariant windowPos = m_config->getQtOption("windowPos");
|
||||||
if (!windowPos.isNull()) {
|
if (!windowPos.isNull()) {
|
||||||
|
|
|
@ -178,6 +178,7 @@ private:
|
||||||
bool m_fullscreenOnStart;
|
bool m_fullscreenOnStart;
|
||||||
QTimer m_focusCheck;
|
QTimer m_focusCheck;
|
||||||
bool m_autoresume;
|
bool m_autoresume;
|
||||||
|
bool m_wasOpened;
|
||||||
|
|
||||||
bool m_hitUnimplementedBiosCall;
|
bool m_hitUnimplementedBiosCall;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue