MCPcopy Create free account
hub / github.com/TASEmulators/fceux / GetRomPath

Function GetRomPath

src/drivers/win/main.cpp:1191–1208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1189}
1190
1191std::string GetRomPath(bool force)
1192{
1193 //The purpose of this function is to format the ROM name stored in LoadedRomFName
1194 //And return a char array with just the name with path or extension
1195 //The purpose of this function is to populate a save as dialog with the ROM name as a default filename
1196 // LoadedRomFName; //Contains full path of ROM
1197 std::string Rom; //Will contain the formatted path
1198 if(GameInfo || force) //If ROM is loaded
1199 {
1200 char drv[PATH_MAX], dir[PATH_MAX], name[PATH_MAX], ext[PATH_MAX];
1201 splitpath(LoadedRomFName,drv,dir,name,ext); //Extract components of the ROM path
1202 Rom = drv; //Pull out the Path only
1203 Rom.append(dir);
1204 }
1205 else
1206 Rom = "";
1207 return Rom;
1208}

Callers 4

ShowINESFileBoxFunction · 0.85
CDLoggerCallBFunction · 0.85
SaveCDLogFileFunction · 0.85
CDLoggerROMChangedFunction · 0.85

Calls 1

splitpathFunction · 0.85

Tested by

no test coverage detected