cake
/
p7utils
Archived
1
0
Fork 0

Initialized SDL *after* libp7.

This commit is contained in:
Thomas Touhey 2016-12-27 13:40:57 +01:00
parent b773e94b2b
commit d2ff359334
1 changed files with 7 additions and 7 deletions

View File

@ -125,13 +125,6 @@ int main(int ac, char **av)
if (parse_args(ac, av, &device, &zoom))
return (0);
/* Initialize SDL */
if (SDL_Init(SDL_INIT_VIDEO)) {
log("Failed to initialize SDL: %s\n", SDL_GetError());
return (3);
}
atexit(SDL_Quit);
/* Initialize libp7 */
p7_handle_t *handle; int err;
if (device) err = p7_cinit(&handle, 0, 0, device, 0);
@ -148,6 +141,13 @@ int main(int ac, char **av)
return (1);
}
/* Initialize SDL */
if (SDL_Init(SDL_INIT_VIDEO)) {
log("Failed to initialize SDL: %s\n", SDL_GetError());
return (3);
}
atexit(SDL_Quit);
/* receive screen */
if ((err = p7_getscreen(handle, &display_callback))
&& err != p7_error_nocalc) {