SDL2: Fix up cheats (still missing UI
This commit is contained in:
parent
520cb85217
commit
1ab8226f0d
|
@ -35,6 +35,20 @@ static void CheatError(TCHAR* pszFilename, INT32 nLineNumber, CheatInfo* pCheat,
|
||||||
}
|
}
|
||||||
|
|
||||||
FBAPopupDisplay(PUF_TYPE_ERROR);
|
FBAPopupDisplay(PUF_TYPE_ERROR);
|
||||||
|
#elseif defined(BUILD_SDL2)
|
||||||
|
printf("Cheat file %s is malformed.\nPlease remove or repair the file.\n\n", pszFilename);
|
||||||
|
if (pCheat) {
|
||||||
|
printf("Parse error at line %i, in cheat \"%s\".\n", nLineNumber, pCheat->szCheatName);
|
||||||
|
} else {
|
||||||
|
printf("Parse error at line %i.\n", nLineNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pszInfo) {
|
||||||
|
printf("Problem:\t%s.\n", pszInfo);
|
||||||
|
}
|
||||||
|
if (pszLine) {
|
||||||
|
printf("Text:\t%s\n", pszLine);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -671,5 +685,3 @@ INT32 ConfigCheatLoad()
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ int ConfigAppSave()
|
||||||
STR(szAppPreviewsPath);
|
STR(szAppPreviewsPath);
|
||||||
fprintf(f, "\n// Path to titlescreen images for use on the menu (include trailing slash)\n");
|
fprintf(f, "\n// Path to titlescreen images for use on the menu (include trailing slash)\n");
|
||||||
STR(szAppTitlesPath);
|
STR(szAppTitlesPath);
|
||||||
fprintf(f, "\n// UNUSED CURRENTLY (include trailing slash)\n");
|
fprintf(f, "\n// Cheat files path (include trailing slash)\n");
|
||||||
STR(szAppCheatsPath);
|
STR(szAppCheatsPath);
|
||||||
fprintf(f, "\n// Hiscore save path (include trailing slash)\n");
|
fprintf(f, "\n// Hiscore save path (include trailing slash)\n");
|
||||||
STR(szAppHiscorePath);
|
STR(szAppHiscorePath);
|
||||||
|
|
|
@ -127,7 +127,7 @@ int DrvInit(int nDrvNum, bool bRestore)
|
||||||
|
|
||||||
bSaveRAM = false;
|
bSaveRAM = false;
|
||||||
nBurnLayer = 0xFF; // show all layers
|
nBurnLayer = 0xFF; // show all layers
|
||||||
|
ConfigCheatLoad();
|
||||||
// Reset the speed throttling code, so we don't 'jump' after the load
|
// Reset the speed throttling code, so we don't 'jump' after the load
|
||||||
RunReset();
|
RunReset();
|
||||||
VidExit();
|
VidExit();
|
||||||
|
|
|
@ -239,15 +239,15 @@ void ingame_gui_start(SDL_Renderer* renderer)
|
||||||
|
|
||||||
while (!finished)
|
while (!finished)
|
||||||
{
|
{
|
||||||
starting_stick = SDL_GetTicks();
|
starting_stick = SDL_GetTicks();
|
||||||
|
|
||||||
finished = ingame_gui_process();
|
finished = ingame_gui_process();
|
||||||
ingame_gui_render();
|
ingame_gui_render();
|
||||||
|
|
||||||
// limit 5 FPS (free CPU usage)
|
// limit 5 FPS (free CPU usage)
|
||||||
if ( ( 1000 / 5 ) > SDL_GetTicks() - starting_stick) {
|
if ( ( 1000 / 5 ) > SDL_GetTicks() - starting_stick)
|
||||||
SDL_Delay( 1000 / 5 - ( SDL_GetTicks() - starting_stick ) );
|
{
|
||||||
}
|
SDL_Delay( 1000 / 5 - ( SDL_GetTicks() - starting_stick ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ingame_gui_exit();
|
ingame_gui_exit();
|
||||||
|
|
Loading…
Reference in New Issue