mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add a workaround for MINGW
This commit is contained in:
parent
e81094ee60
commit
e960da95e2
|
@ -1213,7 +1213,14 @@ bool platform_setup_uri_protocol()
|
||||||
HKEY hMuiCacheKey;
|
HKEY hMuiCacheKey;
|
||||||
if (RegCreateKeyW(hRootKey, MUI_CACHE, &hMuiCacheKey) == ERROR_SUCCESS) {
|
if (RegCreateKeyW(hRootKey, MUI_CACHE, &hMuiCacheKey) == ERROR_SUCCESS) {
|
||||||
swprintf_s(buffer, sizeof(buffer), L"%s.FriendlyAppName", exePath);
|
swprintf_s(buffer, sizeof(buffer), L"%s.FriendlyAppName", exePath);
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
// mingw-w64 defines RegSetKeyValueW's signature incorrectly
|
||||||
|
// A fix has already been submitted upstream, this can be be removed after their next release:
|
||||||
|
// https://sourceforge.net/p/mingw-w64/mingw-w64/ci/da9341980a4b70be3563ac09b5927539e7da21f7/
|
||||||
|
RegSetKeyValueW(hMuiCacheKey, NULL, (LPCSTR)buffer, REG_SZ, (LPCSTR)L"OpenRCT2", sizeof(L"OpenRCT2") + 1);
|
||||||
|
#else
|
||||||
RegSetKeyValueW(hMuiCacheKey, NULL, buffer, REG_SZ, L"OpenRCT2", sizeof(L"OpenRCT2") + 1);
|
RegSetKeyValueW(hMuiCacheKey, NULL, buffer, REG_SZ, L"OpenRCT2", sizeof(L"OpenRCT2") + 1);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
log_verbose("URI protocol setup successful");
|
log_verbose("URI protocol setup successful");
|
||||||
|
|
Loading…
Reference in New Issue