Browse Source

url: Attempt #23235 at WinRT support...

Ryan C. Gordon 4 years ago
parent
commit
fc05a696ad
1 changed files with 3 additions and 7 deletions
  1. 3 7
      src/misc/winrt/SDL_sysurl.cpp

+ 3 - 7
src/misc/winrt/SDL_sysurl.cpp

@@ -21,19 +21,15 @@
 
 #include <Windows.h>
 
-#include "../../core/windows/SDL_windows.h"
 #include "../SDL_sysurl.h"
 
 int
 SDL_SYS_OpenURL(const char *url)
 {
-    WCHAR *wurl = WIN_UTF8ToString(url);
-    if (wurl == NULL) {
-        return SDL_OutOfMemory();
-    }
-
-    auto uri = ref new Windows::Foundation::Uri(wurl);
+    Platform::String^ strurl = url;
     SDL_free(wurl);
+
+    auto uri = ref new Windows::Foundation::Uri(strurl);
     launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
     return 0;
 }