mirror of https://github.com/encounter/SDL.git
url: Attempt #23235 at WinRT support...
This commit is contained in:
parent
02addf135d
commit
fc05a696ad
|
@ -21,19 +21,15 @@
|
||||||
|
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
#include "../../core/windows/SDL_windows.h"
|
|
||||||
#include "../SDL_sysurl.h"
|
#include "../SDL_sysurl.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
SDL_SYS_OpenURL(const char *url)
|
SDL_SYS_OpenURL(const char *url)
|
||||||
{
|
{
|
||||||
WCHAR *wurl = WIN_UTF8ToString(url);
|
Platform::String^ strurl = url;
|
||||||
if (wurl == NULL) {
|
|
||||||
return SDL_OutOfMemory();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto uri = ref new Windows::Foundation::Uri(wurl);
|
|
||||||
SDL_free(wurl);
|
SDL_free(wurl);
|
||||||
|
|
||||||
|
auto uri = ref new Windows::Foundation::Uri(strurl);
|
||||||
launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
|
launchUriOperation(Windows::System::Launcher::LaunchUriAsync(uri));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue