all repos — mgba @ 84a7b6a31690ff5a2b4edea9830807d23555aaaa

mGBA Game Boy Advance Emulator

Qt: Fix crash in sprite viewer magnification (fixes #1362)
Vicki Pfau vi@endrift.com
Fri, 22 Mar 2019 23:05:29 -0700
commit

84a7b6a31690ff5a2b4edea9830807d23555aaaa

parent

f3caf890b0e0fd69cf66cdfe7552ab6044971328

2 files changed, 5 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -24,6 +24,7 @@ - LR35902: Fix disassembly of several CB-prefix instructions

- Qt: Fix overrides getting discarded (fixes mgba.io/i/1354) - Qt: Fix saved scale not getting set on resize (fixes mgba.io/i/1074) - CMake: Fix .deb imagemagick dependencies + - Qt: Fix crash in sprite viewer magnification (fixes mgba.io/i/1362) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
M src/platform/qt/TilePainter.cppsrc/platform/qt/TilePainter.cpp

@@ -62,8 +62,11 @@ int h = (tiles + w - 1) * m_size / w;

setMinimumSize(m_size, h - (h % m_size)); } else { int w = minimumSize().width() / m_size; + if (!w) { + w = 1; + } int h = (tiles + w - 1) * m_size / w; - setMinimumSize(minimumSize().width(), h - (h % m_size)); + setMinimumSize(w * m_size, h - (h % m_size)); } resizeEvent(nullptr); }