mirror of
https://github.com/encounter/SDL.git
synced 2025-05-31 19:51:38 +00:00
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
|
// TODO, WinRT: pass the C-style main() a reasonably realistic
|
||||||
// representation of command line arguments.
|
// representation of command line arguments.
|
||||||
int argc = 0;
|
int argc = 1;
|
||||||
char **argv = NULL;
|
char **argv = (char **)SDL_malloc(2 * sizeof(*argv));
|
||||||
|
if (!argv) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
argv[0] = SDL_strdup("WinRTApp");
|
||||||
|
argv[1] = NULL;
|
||||||
WINRT_SDLAppEntryPoint(argc, argv);
|
WINRT_SDLAppEntryPoint(argc, argv);
|
||||||
|
SDL_free(argv[0]);
|
||||||
|
SDL_free(argv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user