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

Function GetRomName

src/drivers/win/main.cpp:1172–1189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1170}
1171
1172std::string GetRomName(bool force)
1173{
1174 //The purpose of this function is to format the ROM name stored in LoadedRomFName
1175 //And return a char array with just the name with path or extension
1176 //The purpose of this function is to populate a save as dialog with the ROM name as a default filename
1177 // LoadedRomFName; //Contains full path of ROM
1178 std::string Rom; //Will contain the formatted path
1179 if(GameInfo || force) //If ROM is loaded
1180 {
1181 char drv[PATH_MAX], dir[PATH_MAX], name[PATH_MAX], ext[PATH_MAX];
1182 splitpath(LoadedRomFName,drv,dir,name,ext); //Extract components of the ROM path
1183 Rom = name; //Pull out the Name only
1184 }
1185 else
1186 Rom = "";
1187
1188 return Rom;
1189}
1190
1191std::string GetRomPath(bool force)
1192{

Callers 15

DumpSubtitlesFunction · 0.85
FCEUD_AviRecordToFunction · 0.85
ShowLogDirDialogFunction · 0.85
SaveRomAsFunction · 0.85
dumpToFileFunction · 0.85
loadFromFileFunction · 0.85
MemViewCallBFunction · 0.85
SaveMemWatchFunction · 0.85
ShowINESFileBoxFunction · 0.85
CreateSoundSaveFunction · 0.85
CDLoggerCallBFunction · 0.85
SaveCDLogFileAsFunction · 0.85

Calls 1

splitpathFunction · 0.85

Tested by

no test coverage detected