SDL  2.0
SDL_sysurl.cpp File Reference
#include <Windows.h>
#include "../../core/windows/SDL_windows.h"
#include "../SDL_sysurl.h"
+ Include dependency graph for SDL_sysurl.cpp:

Go to the source code of this file.

Functions

int SDL_SYS_OpenURL (const char *url)
 

Function Documentation

◆ SDL_SYS_OpenURL()

int SDL_SYS_OpenURL ( const char *  url)

Definition at line 28 of file SDL_sysurl.cpp.

29 {
30  WCHAR *wurl = WIN_UTF8ToString(url);
31  if (!wurl) {
32  return SDL_OutOfMemory();
33  }
34  auto strurl = ref new Platform::String(wurl);
35  SDL_free(wurl);
36 
37  auto uri = ref new Windows::Foundation::Uri(strurl);
38  Windows::System::Launcher::LaunchUriAsync(uri);
39  return 0; // oh well, we're not waiting on an async task here.
40 }
#define SDL_free
#define SDL_OutOfMemory()
Definition: SDL_error.h:88
GLenum GLint ref
#define WIN_UTF8ToString(S)
Definition: SDL_windows.h:47

References SDL_free, SDL_OutOfMemory, and WIN_UTF8ToString.

Referenced by SDL_OpenURL().