| 1189 | } |
| 1190 | |
| 1191 | std::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 | } |
no test coverage detected