all repos — mgba @ 470538d4db412c84261b477e02413c04c6be322b

mGBA Game Boy Advance Emulator

Qt: Show multiplayer numbers in window title
Jeffrey Pfau jeffrey@endrift.com
Thu, 09 Apr 2015 23:16:17 -0700
commit

470538d4db412c84261b477e02413c04c6be322b

parent

41bbee1efd045f64b439860523482fc24b96f802

2 files changed, 10 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -17,6 +17,8 @@ - GBA Audio: Force audio FIFOs to 32-bit

- GBA Memory: Ensure changing the timing of a DMA reschedules it - Qt: Fix window not regaining focus after exiting savestate window - Qt: Fix regression where video would not record if the game had already started +Misc: + - Qt: Show multiplayer numbers in window title 0.2.0: (2015-04-03) Features:
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -519,8 +519,14 @@ }

} void Window::showFPS() { - char title[13] = { '\0' }; - GBAGetGameTitle(m_controller->thread()->gba, title); + char gameTitle[13] = { '\0' }; + GBAGetGameTitle(m_controller->thread()->gba, gameTitle); + + QString title(gameTitle); + std::shared_ptr<MultiplayerController> multiplayer = m_controller->multiplayerController(); + if (multiplayer && multiplayer->attached() > 1) { + title += tr(" - Player %1 of %2").arg(m_playerId + 1).arg(multiplayer->attached()); + } if (m_frameList.isEmpty()) { setWindowTitle(tr(PROJECT_NAME " - %1").arg(title)); return;