Merge pull request #254 from mjbudd77/master
For Qt/SDL port, added logic to always attempt to resolve the absolute path to the ROM…
This commit is contained in:
commit
650d9eb472
|
@ -206,12 +206,26 @@ int reloadLastGame(void)
|
|||
*/
|
||||
int LoadGame(const char *path, bool silent)
|
||||
{
|
||||
char fullpath[4096];
|
||||
int gg_enabled, autoLoadDebug, autoOpenDebugger, autoInputPreset;
|
||||
|
||||
if (isloaded){
|
||||
CloseGame();
|
||||
}
|
||||
|
||||
#if defined(__linux) || defined(__APPLE__)
|
||||
|
||||
// Resolve absolute path to file
|
||||
if ( realpath( path, fullpath ) == NULL )
|
||||
{
|
||||
strcpy( fullpath, path );
|
||||
}
|
||||
#else
|
||||
strcpy( fullpath, path );
|
||||
#endif
|
||||
|
||||
//printf("Fullpath: %zi '%s'\n", sizeof(fullpath), fullpath );
|
||||
|
||||
// For some reason, the core of the emulator clears the state of
|
||||
// the game genie option selection. So check the config each time
|
||||
// and re-enable the core game genie state if needed.
|
||||
|
@ -219,7 +233,7 @@ int LoadGame(const char *path, bool silent)
|
|||
|
||||
FCEUI_SetGameGenie (gg_enabled);
|
||||
|
||||
if(!FCEUI_LoadGame(path, 1, silent)) {
|
||||
if(!FCEUI_LoadGame(fullpath, 1, silent)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue