From 6d2e81d2461d5486eeb0d019580fc9dc2067cc92 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 9 Apr 2015 23:16:17 -0700 Subject: [PATCH] Qt: Show multiplayer numbers in window title --- CHANGES | 2 ++ src/platform/qt/Window.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index ed2224dc5..f32c3a6bc 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,8 @@ Bugfixes: - 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: diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index b48732e31..14bc594a4 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -518,8 +518,14 @@ void Window::recordFrame() { } 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 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;