SDL: Fix Windows build never searching PATH
Some local variable was blocking the global variable.
This commit is contained in:
parent
2a237aea6b
commit
d464bc4dfe
|
@ -384,10 +384,10 @@ FILE* sdlFindFile(const char* name)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
char* home = getenv("USERPROFILE");
|
char* profileDir = getenv("USERPROFILE");
|
||||||
if (home != NULL) {
|
if (profileDir != NULL) {
|
||||||
fprintf(stdout, "Searching user profile directory: %s\n", home);
|
fprintf(stdout, "Searching user profile directory: %s\n", profileDir);
|
||||||
sprintf(path, "%s%c%s", home, FILE_SEP, name);
|
sprintf(path, "%s%c%s", profileDir, FILE_SEP, name);
|
||||||
f = fopen(path, "r");
|
f = fopen(path, "r");
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
return f;
|
return f;
|
||||||
|
|
Loading…
Reference in New Issue