| 115 | } |
| 116 | |
| 117 | bool GSDumpReplayer::ChangeDump(const char* filename) |
| 118 | { |
| 119 | Console.WriteLn("(GSDumpReplayer) Switching to '%s'...", filename); |
| 120 | |
| 121 | if (!VMManager::IsGSDumpFileName(filename)) |
| 122 | { |
| 123 | Host::ReportFormattedErrorAsync("GSDumpReplayer", "'%s' is not a GS dump.", filename); |
| 124 | return false; |
| 125 | } |
| 126 | |
| 127 | Error error; |
| 128 | std::unique_ptr<GSDumpFile> new_dump(GSDumpFile::OpenGSDump(filename)); |
| 129 | if (!new_dump || !new_dump->ReadFile(&error)) |
| 130 | { |
| 131 | Host::ReportErrorAsync("GSDumpReplayer", fmt::format("Failed to open or read '{}': {}", |
| 132 | Path::GetFileName(filename), error.GetDescription())); |
| 133 | return false; |
| 134 | } |
| 135 | |
| 136 | s_dump_file = std::move(new_dump); |
| 137 | s_current_packet = 0; |
| 138 | |
| 139 | // Don't forget to reset the GS! |
| 140 | GSDumpReplayerCpuReset(); |
| 141 | return true; |
| 142 | } |
| 143 | |
| 144 | void GSDumpReplayer::Shutdown() |
| 145 | { |
nothing calls this directly
no test coverage detected