X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fuiq3%2Fengine%2Fmain.cpp;h=66fee3386ef2cd7104104b52c4d1b5f33a002e86;hb=e59af1c9b829484ffa4c84b680c6ce9abcdfa53f;hp=53454c95597db452ec3a19e1eee1221a7b71e6a0;hpb=f8af96349ea464111fbef3c6528016c3dc34cdcf;p=picodrive.git diff --git a/platform/uiq3/engine/main.cpp b/platform/uiq3/engine/main.cpp index 53454c9..66fee33 100644 --- a/platform/uiq3/engine/main.cpp +++ b/platform/uiq3/engine/main.cpp @@ -17,7 +17,7 @@ #include "debug.h" #include "../Engine.h" -#include +#include #include "../../common/emu.h" #include "../emu.h" #include "vid.h" @@ -331,8 +331,8 @@ static void TargetEpocGameL() if (PicoAHW & PAHW_MCD) PicoCDBufferFree(); // save SRAM - if ((currentConfig.EmuOpt & EOPT_USE_SRAM) && SRam.changed) { - emu_SaveLoadGame(0, 1); + if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && SRam.changed) { + emu_save_load_game(0, 1); SRam.changed = 0; } CPolledActiveScheduler::Instance()->Schedule(); @@ -346,7 +346,7 @@ static void TargetEpocGameL() } else if(gamestate == PGS_ReloadRom) { - loadrom_result = emu_ReloadRom(loadrom_fname); + loadrom_result = emu_reload_rom(loadrom_fname); pico_was_reset = 1; if (loadrom_result) gamestate = PGS_Running; @@ -379,7 +379,7 @@ static void TargetEpocGameL() User::After(150000); } - emu_WriteConfig(0); + emu_write_config(0); CGameWindow::FreeResources(); } else if(gamestate == PGS_Quit) { break; @@ -853,7 +853,7 @@ void CGameWindow::RunEvents(TUint32 which) if(PsndOut) gameAudio->Pause(); // this may take a while, so we pause sound output vidDrawNotice((which & 0x1000) ? "LOADING@GAME" : "SAVING@GAME"); - emu_SaveLoadGame(which & 0x1000, 0); + emu_save_load_game(which & 0x1000, 0); if(PsndOut) PsndOut = gameAudio->ResumeL(); reset_timing = 1; @@ -889,9 +889,16 @@ void CGameWindow::RunEvents(TUint32 which) } -extern "C" void emu_noticeMsgUpdated(void) +extern "C" void plat_status_msg(const char *format, ...) { - char *p = noticeMsg; + va_list vl; + char *p; + + va_start(vl, format); + vsnprintf(noticeMsg, sizeof(noticeMsg), fmt, vl); + va_end(vl); + + p = noticeMsg; while (*p) { if (*p == ' ') *p = '@'; if (*p < '0' || *p > 'Z') { *p = 0; break; }