WIN32: Use HINSTANCE for OSystem_Win32::openUrl

This implementation now matches previous ShellExecute() calls, so we are
now consistent in that regard. It also
silences a warning in Mingw complaining about a type mismatch.
This commit is contained in:
Lothar Serra Mari 2019-06-23 22:56:40 +02:00 committed by Filippos Karapetis
parent a9ecbce2f1
commit 119bcc2b90

View file

@ -169,10 +169,10 @@ bool OSystem_Win32::displayLogFile() {
} }
bool OSystem_Win32::openUrl(const Common::String &url) { bool OSystem_Win32::openUrl(const Common::String &url) {
const uint64 result = (uint64)ShellExecute(0, 0, /*(wchar_t*)nativeFilePath.utf16()*/url.c_str(), 0, 0, SW_SHOWNORMAL); HINSTANCE result = ShellExecute(NULL, NULL, /*(wchar_t*)nativeFilePath.utf16()*/url.c_str(), NULL, NULL, SW_SHOWNORMAL);
// ShellExecute returns a value greater than 32 if successful // ShellExecute returns a value greater than 32 if successful
if (result <= 32) { if ((intptr_t)result <= 32) {
warning("ShellExecute failed: error = %u", result); warning("ShellExecute failed: error = %p", (void*)result);
return false; return false;
} }
return true; return true;