| 30 | #include <filesystem> |
| 31 | |
| 32 | void remove_savestates(Context* context) |
| 33 | { |
| 34 | std::filesystem::path savestateprefix = context->config.savestatedir / context->gamename; |
| 35 | for (int i=0; i<=10; i++) { |
| 36 | std::filesystem::path savestatepmpath = savestateprefix; |
| 37 | savestatepmpath += ".state" + std::to_string(i) + ".pm"; |
| 38 | std::filesystem::remove(savestatepmpath); |
| 39 | std::filesystem::path savestatepspath = savestateprefix; |
| 40 | savestatepspath += ".state" + std::to_string(i) + ".p"; |
| 41 | std::filesystem::remove(savestatepspath); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | int extractBinaryType(std::filesystem::path path) |
| 46 | { |