mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 12:56:27 -05:00
startup_checks: Use GetEnvironmentVariableA
Solves MSVC compile error. Also drops need string use for comparison.
This commit is contained in:
parent
d57cd8bcdd
commit
2d2a69ab5b
1 changed files with 3 additions and 4 deletions
|
@ -34,11 +34,10 @@ void CheckVulkan() {
|
||||||
bool StartupChecks(const char* arg0, bool* has_broken_vulkan) {
|
bool StartupChecks(const char* arg0, bool* has_broken_vulkan) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Check environment variable to see if we are the child
|
// Check environment variable to see if we are the child
|
||||||
char variable_contents[32];
|
char variable_contents[8];
|
||||||
const DWORD startup_check_var =
|
const DWORD startup_check_var =
|
||||||
GetEnvironmentVariable(STARTUP_CHECK_ENV_VAR, variable_contents, 32);
|
GetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, variable_contents, 8);
|
||||||
const std::string variable_contents_s{variable_contents};
|
if (startup_check_var > 0 && std::strncmp(variable_contents, "ON", 8) == 0) {
|
||||||
if (startup_check_var > 0 && variable_contents_s == "ON") {
|
|
||||||
CheckVulkan();
|
CheckVulkan();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue