diff --git a/src/main.c b/src/main.c index c518788..a53b057 100644 --- a/src/main.c +++ b/src/main.c @@ -946,6 +946,11 @@ static void _showMessageBox(const char* title, const char* message) SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, title, message, NULL); } +static void _setWindowTitle(const char* title) +{ + SDL_SetWindowTitle(platform.window, title); +} + static System sysHandlers = { .setClipboardText = _setClipboardText, @@ -963,6 +968,7 @@ static System sysHandlers = .goFullscreen = _goFullscreen, .showMessageBox = _showMessageBox, + .setWindowTitle = _setWindowTitle, }; s32 main(s32 argc, char **argv) diff --git a/src/run.c b/src/run.c index f7322de..ccfe66b 100644 --- a/src/run.c +++ b/src/run.c @@ -93,6 +93,7 @@ static void tick(Run* run) enum {Size = sizeof(tic_persistent)}; + // TODO: remove PMEM checking... if(memcmp(&run->tic->persistent, &run->persistent, Size) != 0) { fsSaveRootFile(run->console->fs, run->saveid, &run->tic->persistent, Size, true); diff --git a/src/studio.c b/src/studio.c index b654f92..8af2c6c 100644 --- a/src/studio.c +++ b/src/studio.c @@ -1133,12 +1133,12 @@ static void updateMDate() static void updateTitle() { - // char name[FILENAME_MAX] = TIC_TITLE; + char name[FILENAME_MAX] = TIC_TITLE; - // if(strlen(studioImpl.console->romName)) - // sprintf(name, "%s [%s]", TIC_TITLE, studioImpl.console->romName); + if(strlen(studioImpl.console->romName)) + sprintf(name, "%s [%s]", TIC_TITLE, studioImpl.console->romName); - // SDL_SetWindowTitle(studioImpl.window, name); + studioImpl.system->setWindowTitle(name); } void studioRomSaved() @@ -1722,7 +1722,6 @@ static void processShortcuts() { studioImpl.mode == TIC_MENU_MODE ? hideGameMenu() : showGameMenu(); // studioImpl.gamepad.backProcessed = true; - return; } else if(keyWasPressedOnce(tic_key_f11)) goFullscreen(); else if(keyWasPressedOnce(tic_key_return)) @@ -1735,6 +1734,7 @@ static void processShortcuts() else if(keyWasPressedOnce(tic_key_f9)) startVideoRecord(); #endif + return; } if(alt) diff --git a/src/studio.h b/src/studio.h index 2d5f60e..307e460 100644 --- a/src/studio.h +++ b/src/studio.h @@ -233,6 +233,7 @@ typedef struct void (*goFullscreen)(); void (*showMessageBox)(const char* title, const char* message); + void (*setWindowTitle)(const char* title); } System;