Initialized SDL *after* libp7.
This commit is contained in:
parent
b773e94b2b
commit
d2ff359334
|
@ -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) {
|
||||
|
|
Reference in New Issue