mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00: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
|
@ -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