diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/startup_checks.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/yuzu/startup_checks.cpp b/src/yuzu/startup_checks.cpp index 0919d89c6..8421280bf 100644 --- a/src/yuzu/startup_checks.cpp +++ b/src/yuzu/startup_checks.cpp | |||
| @@ -58,13 +58,11 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan) { | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | // Wait until the processs exits and get exit code from it | 60 | // Wait until the processs exits and get exit code from it |
| 61 | WaitForSingleObject(process_info.hProcess, INFINITE); | ||
| 61 | DWORD exit_code = STILL_ACTIVE; | 62 | DWORD exit_code = STILL_ACTIVE; |
| 62 | while (exit_code == STILL_ACTIVE) { | 63 | const int err = GetExitCodeProcess(process_info.hProcess, &exit_code); |
| 63 | const int err = GetExitCodeProcess(process_info.hProcess, &exit_code); | 64 | if (err == 0) { |
| 64 | if (err == 0) { | 65 | std::fprintf(stderr, "GetExitCodeProcess failed with error %d\n", GetLastError()); |
| 65 | std::fprintf(stderr, "GetExitCodeProcess failed with error %d\n", GetLastError()); | ||
| 66 | break; | ||
| 67 | } | ||
| 68 | } | 66 | } |
| 69 | 67 | ||
| 70 | // Vulkan is broken if the child crashed (return value is not zero) | 68 | // Vulkan is broken if the child crashed (return value is not zero) |
| @@ -77,6 +75,11 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan) { | |||
| 77 | std::fprintf(stderr, "CloseHandle failed with error %d\n", GetLastError()); | 75 | std::fprintf(stderr, "CloseHandle failed with error %d\n", GetLastError()); |
| 78 | } | 76 | } |
| 79 | 77 | ||
| 78 | if (!SetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, nullptr)) { | ||
| 79 | std::fprintf(stderr, "SetEnvironmentVariableA failed to clear %s with error %d\n", | ||
| 80 | STARTUP_CHECK_ENV_VAR, GetLastError()); | ||
| 81 | } | ||
| 82 | |||
| 80 | #elif defined(YUZU_UNIX) | 83 | #elif defined(YUZU_UNIX) |
| 81 | const pid_t pid = fork(); | 84 | const pid_t pid = fork(); |
| 82 | if (pid == 0) { | 85 | if (pid == 0) { |