Skip to content

Commit

Permalink
url: Attempt #23235 at WinRT support...
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 5, 2020
1 parent 02addf1 commit fc05a69
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/misc/winrt/SDL_sysurl.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit fc05a69

Please sign in to comment.