all repos — mgba @ 0378fa229d817abe2128e920e7091e53e1e0919f

mGBA Game Boy Advance Emulator

Qt: Cap the maximum number of multiplayer windows
Jeffrey Pfau jeffrey@endrift.com
Sat, 30 May 2015 00:34:53 -0700
commit

0378fa229d817abe2128e920e7091e53e1e0919f

parent

27b4f351390ac32b423a8b1f5688dae58ab78749

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

jump to
M CHANGESCHANGES

@@ -31,6 +31,7 @@ - GBA: Fix crash if a 512kb flash save is loaded when a game has a 1Mb flash override

- Qt: Better cleanup when a game crashes - Qt: Fix open ROM dialog filtering for archive formats - ARM7: Fix Thumb MUL timing + - Qt: Cap the maximum number of multiplayer windows Misc: - Qt: Handle saving input settings better - Debugger: Free watchpoints in addition to breakpoints
M src/platform/qt/GBAApp.cppsrc/platform/qt/GBAApp.cpp

@@ -67,7 +67,10 @@ }

return QApplication::event(event); } -Window* GBAApp::newWindowInternal() { +Window* GBAApp::newWindow() { + if (m_multiplayer.attached() >= MAX_GBAS) { + return nullptr; + } Window* w = new Window(&m_configController, m_multiplayer.attached()); m_windows[m_multiplayer.attached()] = w; w->setAttribute(Qt::WA_DeleteOnClose);