| 86 | } |
| 87 | |
| 88 | bool GSDumpReplayer::Initialize(const char* filename, Error* error) |
| 89 | { |
| 90 | Common::Timer timer; |
| 91 | Console.WriteLn("(GSDumpReplayer) Reading file '%s'...", filename); |
| 92 | |
| 93 | Error dump_error; |
| 94 | s_dump_file = GSDumpFile::OpenGSDump(filename, &dump_error); |
| 95 | if (!s_dump_file || !s_dump_file->ReadFile(&dump_error)) |
| 96 | { |
| 97 | Error::SetStringFmt(error, TRANSLATE_FS("GSDumpReplayer", "Failed to open or read '{}': {}"), |
| 98 | Path::GetFileName(filename), dump_error.GetDescription()); |
| 99 | s_dump_file.reset(); |
| 100 | return false; |
| 101 | } |
| 102 | |
| 103 | Console.WriteLn("(GSDumpReplayer) Read file in %.2f ms.", timer.GetTimeMilliseconds()); |
| 104 | |
| 105 | // We replace all CPUs. |
| 106 | Cpu = &GSDumpReplayerCpu; |
| 107 | psxCpu = &psxInt; |
| 108 | CpuVU0 = &gsDumpVU0; |
| 109 | CpuVU1 = &gsDumpVU1; |
| 110 | |
| 111 | // loop infinitely by default |
| 112 | s_dump_loop_count = -1; |
| 113 | |
| 114 | return true; |
| 115 | } |
| 116 | |
| 117 | bool GSDumpReplayer::ChangeDump(const char* filename) |
| 118 | { |
nothing calls this directly
no test coverage detected