Commit 92971179 authored by nanahira's avatar nanahira

fix

parent a50d363f
Pipeline #37743 failed with stages
in 5 minutes and 52 seconds
...@@ -2547,11 +2547,11 @@ void Game::SetCursor(irr::gui::ECURSOR_ICON icon) { ...@@ -2547,11 +2547,11 @@ void Game::SetCursor(irr::gui::ECURSOR_ICON icon) {
} }
void Game::InjectEnvToRegistry(intptr_t pduel) { void Game::InjectEnvToRegistry(intptr_t pduel) {
#ifdef _WIN32 #ifdef _WIN32
LPTCH env_strings = GetEnvironmentStringsA(); auto env_strings = GetEnvironmentStringsA();
if (!env_strings) return; if (!env_strings) return;
const std::string prefix = "YGOPRO_ENV_"; const std::string prefix = "YGOPRO_ENV_";
for (char* var = env_strings; *var; var += strlen(var) + 1) { for (auto* var = env_strings; *var; var += strlen(var) + 1) {
std::string entry(var); std::string entry(var);
if (entry.compare(0, prefix.size(), prefix) == 0) { if (entry.compare(0, prefix.size(), prefix) == 0) {
auto eq_pos = entry.find('='); auto eq_pos = entry.find('=');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment