From 6e098f1b0e181431f9f7b0b490a8cebe0b73049f Mon Sep 17 00:00:00 2001 From: Edward Li Date: Sun, 5 Nov 2023 04:38:02 +0800 Subject: [PATCH] macOS: Use badge label to indicate slave instances --- .../emulator-osx/emulator-osx/osx-main.mm | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/shell/apple/emulator-osx/emulator-osx/osx-main.mm b/shell/apple/emulator-osx/emulator-osx/osx-main.mm index d784399925..4ea0bae2e1 100644 --- a/shell/apple/emulator-osx/emulator-osx/osx-main.mm +++ b/shell/apple/emulator-osx/emulator-osx/osx-main.mm @@ -13,6 +13,7 @@ #include #include "types.h" +#include "cfg/option.h" #include "log/LogManager.h" #if defined(USE_SDL) #include "sdl/sdl.h" @@ -144,6 +145,27 @@ static void emu_flycast_term() CFRelease(mainBundle); emu_flycast_init(); + + int boardId = cfgLoadInt("naomi", "BoardId", 0); + if (boardId > 0) + { + NSString *label = @"S"; // Slave + if (config::MultiboardSlaves == 2) // 1 = Single, 2 = Deluxe + { + switch (boardId) { + case 1: + label = @"C"; // Center + break; + case 2: + label = @"L"; // Left + break; + case 3: + label = @"R"; // Right + } + } + [[NSApp dockTile] setBadgeLabel:label]; + } + #ifdef USE_BREAKPAD auto async = std::async(std::launch::async, uploadCrashes, "/tmp"); #endif