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:
parent
a9ecbce2f1
commit
119bcc2b90
1 changed files with 3 additions and 3 deletions
|
@ -169,10 +169,10 @@ bool OSystem_Win32::displayLogFile() {
|
|||
}
|
||||
|
||||
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
|
||||
if (result <= 32) {
|
||||
warning("ShellExecute failed: error = %u", result);
|
||||
if ((intptr_t)result <= 32) {
|
||||
warning("ShellExecute failed: error = %p", (void*)result);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue