Skip to content

Commit

Permalink
macOS: Indicate slave machines by dock badge label
Browse files Browse the repository at this point in the history
  • Loading branch information
vkedwardli authored and flyinghead committed Nov 5, 2023
1 parent f6b3577 commit 51508dc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions shell/apple/emulator-osx/emulator-osx/osx-main.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <mach/mach_port.h>

#include "types.h"
#include "cfg/option.h"
#include "log/LogManager.h"
#if defined(USE_SDL)
#include "sdl/sdl.h"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51508dc

Please sign in to comment.