drivers/multiple/SDL2: initialize only required subsystems
This commit is contained in:
parent
3d543b62bc
commit
fa0c779b0c
@ -33,9 +33,6 @@
|
|||||||
#ifndef GDISP_SCREEN_HEIGHT
|
#ifndef GDISP_SCREEN_HEIGHT
|
||||||
#define GDISP_SCREEN_HEIGHT 480
|
#define GDISP_SCREEN_HEIGHT 480
|
||||||
#endif
|
#endif
|
||||||
#ifndef GFX_SDL_INIT_FLAGS
|
|
||||||
#define GFX_SDL_INIT_FLAGS SDL_INIT_EVERYTHING
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if GINPUT_NEED_MOUSE
|
#if GINPUT_NEED_MOUSE
|
||||||
// Include mouse support code
|
// Include mouse support code
|
||||||
@ -314,7 +311,7 @@ static void *SDL_input_event_loop (void *arg) {
|
|||||||
// Must be executed on early stage of initialization: before threads and timer
|
// Must be executed on early stage of initialization: before threads and timer
|
||||||
|
|
||||||
void sdl_driver_init (void) {
|
void sdl_driver_init (void) {
|
||||||
if (SDL_Init(GFX_SDL_INIT_FLAGS) != 0){
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS) != 0){
|
||||||
fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError());
|
fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError());
|
||||||
exit (1) ;
|
exit (1) ;
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,3 @@ and a touchscreen driver.
|
|||||||
4. Modify your makefile to add `sdl2-config --libs --cflags` to the CFLAGS line. i.e.
|
4. Modify your makefile to add `sdl2-config --libs --cflags` to the CFLAGS line. i.e.
|
||||||
CFLAGS = `sdl2-config --libs --cflags`
|
CFLAGS = `sdl2-config --libs --cflags`
|
||||||
|
|
||||||
By default, this driver will pass the `SDL_INIT_EVERYTHING` flag to SDL_Init(). This
|
|
||||||
can be overriden by defining the GFX_SDL_INIT_FLAGS macro.
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user