diff options
Diffstat (limited to 'runtime/src/main.cpp')
| -rw-r--r-- | runtime/src/main.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp index 5ac73301d..06baae387 100644 --- a/runtime/src/main.cpp +++ b/runtime/src/main.cpp | |||
| @@ -85,8 +85,9 @@ int wmain(int argc, wchar_t** argv) { | |||
| 85 | if (overlay_dir.empty()) overlay_dir = game_dir / "overlay"; | 85 | if (overlay_dir.empty()) overlay_dir = game_dir / "overlay"; |
| 86 | rt::fs::configure(game_dir, overlay_dir); | 86 | rt::fs::configure(game_dir, overlay_dir); |
| 87 | rt::d3d12_trace::set_enabled(trace_d3d12); | 87 | rt::d3d12_trace::set_enabled(trace_d3d12); |
| 88 | if (!trace_file.empty() && !rt::startup_trace::open(trace_file.c_str())) { | 88 | if (int trace_error = 0; !trace_file.empty() && !rt::startup_trace::open(trace_file.c_str(), &trace_error)) { |
| 89 | std::fprintf(stderr, "error: cannot open the trace file\n"); | 89 | std::fprintf(stderr, trace_error == EEXIST ? "error: the trace file already exists; --trace only creates a new file\n" |
| 90 | : "error: cannot create the trace file\n"); | ||
| 90 | return 2; | 91 | return 2; |
| 91 | } | 92 | } |
| 92 | 93 | ||