CLOUD: Move openUrl to OSystem
This commit is contained in:
parent
dff88b1058
commit
1f2a50bcd3
20 changed files with 115 additions and 333 deletions
|
@ -94,7 +94,7 @@ void OSystem_Win32::initBackend() {
|
|||
|
||||
|
||||
bool OSystem_Win32::hasFeature(Feature f) {
|
||||
if (f == kFeatureDisplayLogFile)
|
||||
if (f == kFeatureDisplayLogFile || f == kFeatureOpenUrl)
|
||||
return true;
|
||||
|
||||
return OSystem_SDL::hasFeature(f);
|
||||
|
@ -135,6 +135,16 @@ bool OSystem_Win32::displayLogFile() {
|
|||
return false;
|
||||
}
|
||||
|
||||
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);
|
||||
// ShellExecute returns a value greater than 32 if successful
|
||||
if (result <= 32) {
|
||||
warning("ShellExecute failed: error = %u", result);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Common::String OSystem_Win32::getDefaultConfigFileName() {
|
||||
char configFile[MAXPATHLEN];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue