mirror of https://github.com/encounter/SDL.git
Fixed crash running SDL test programs on UWP
This commit is contained in:
parent
5a0ea7fb17
commit
e04a0221e3
|
@ -357,9 +357,16 @@ void SDL_WinRTApp::Run()
|
|||
{
|
||||
// TODO, WinRT: pass the C-style main() a reasonably realistic
|
||||
// representation of command line arguments.
|
||||
int argc = 0;
|
||||
char **argv = NULL;
|
||||
int argc = 1;
|
||||
char **argv = (char **)SDL_malloc(2 * sizeof(*argv));
|
||||
if (!argv) {
|
||||
return;
|
||||
}
|
||||
argv[0] = SDL_strdup("WinRTApp");
|
||||
argv[1] = NULL;
|
||||
WINRT_SDLAppEntryPoint(argc, argv);
|
||||
SDL_free(argv[0]);
|
||||
SDL_free(argv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue