Remove SDL_VideoInit / Quit. Prefer SDL_SubSytemInit / Quit (#6913)

This commit is contained in:
Sylvain Becker
2022-12-27 14:42:48 +01:00
committed by GitHub
parent 713ba2e31a
commit aa0053141b
14 changed files with 86 additions and 73 deletions

View File

@@ -44,7 +44,7 @@ static SDL_Rect *positions, *velocities;
static void
quit(int rc)
{
SDL_VideoQuit();
SDL_Quit();
if (native_window != NULL && factory != NULL) {
factory->DestroyNativeWindow(native_window);
}
@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
/* Enable standard application logging */
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
if (SDL_VideoInit(NULL) < 0) {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video: %s\n",
SDL_GetError());
exit(1);