From fc05a696ad3431805bf7ecb4dece2f269b9a2533 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 5 Oct 2020 18:08:58 -0400 Subject: [PATCH] url: Attempt #23235 at WinRT support... --- src/misc/winrt/SDL_sysurl.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/misc/winrt/SDL_sysurl.cpp b/src/misc/winrt/SDL_sysurl.cpp index f1314e998..69393cb10 100644 --- a/src/misc/winrt/SDL_sysurl.cpp +++ b/src/misc/winrt/SDL_sysurl.cpp @@ -21,19 +21,15 @@ #include -#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; }