| 1170 | } |
| 1171 | |
| 1172 | std::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 | |
| 1191 | std::string GetRomPath(bool force) |
| 1192 | { |
no test coverage detected