mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix data path command line on windows
This commit is contained in:
parent
94d38b9f7a
commit
a64dae573a
|
@ -510,17 +510,17 @@ void platform_resolve_openrct_data_path()
|
||||||
wchar_t wOutPath[MAX_PATH];
|
wchar_t wOutPath[MAX_PATH];
|
||||||
|
|
||||||
if (gCustomOpenrctDataPath[0] != 0) {
|
if (gCustomOpenrctDataPath[0] != 0) {
|
||||||
wchar_t *customUserDataPathW = utf8_to_widechar(gCustomOpenrctDataPath);
|
wchar_t *customOpenrctDataPathW = utf8_to_widechar(gCustomOpenrctDataPath);
|
||||||
if (GetFullPathNameW(customUserDataPathW, countof(wOutPath), wOutPath, NULL) == 0) {
|
if (GetFullPathNameW(customOpenrctDataPathW, countof(wOutPath), wOutPath, NULL) == 0) {
|
||||||
log_fatal("Unable to resolve path '%s'.", gCustomOpenrctDataPath);
|
log_fatal("Unable to resolve path '%s'.", gCustomOpenrctDataPath);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
utf8 *outPathTemp = widechar_to_utf8(wOutPath);
|
utf8 *outPathTemp = widechar_to_utf8(wOutPath);
|
||||||
safe_strcpy(_userDataDirectoryPath, outPathTemp, sizeof(_userDataDirectoryPath));
|
safe_strcpy(_openrctDataDirectoryPath, outPathTemp, sizeof(_openrctDataDirectoryPath));
|
||||||
free(outPathTemp);
|
free(outPathTemp);
|
||||||
free(customUserDataPathW);
|
free(customOpenrctDataPathW);
|
||||||
|
|
||||||
path_end_with_separator(_userDataDirectoryPath, sizeof(_userDataDirectoryPath));
|
path_end_with_separator(_openrctDataDirectoryPath, sizeof(_openrctDataDirectoryPath));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
char buffer[MAX_PATH];
|
char buffer[MAX_PATH];
|
||||||
|
|
Loading…
Reference in New Issue