View Full Version : OpenGL with SDL; lose all input in fullscreen mode

05-09-2012, 05:11 PM
Hello, my OpenGL application is based on SDL. For some reason, I receive input fine via the SDL_Event unless I add the SDL_Fullscreen flag. In full screen mode, I get no input events at all, strangely.

//Start SDL,

if( SDL_Init( SDL_INIT_EVERYTHING ) != 0 )
printf("SDL failed to initialize: %s\n", SDL_GetError());
return 1;

//Set up screen

SDL_Surface* screen;

SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);

if((screen = SDL_SetVideoMode( 900, 600, 32, SDL_OPENGL | SDL_FULLSCREEN)) == NULL)
printf("Error creating SDL surface: %s\n", SDL_GetError());

Thanks much!

Alfonse Reinheart
05-09-2012, 08:37 PM
Perhaps you should ask on an SDL forum, since this probably has little to do with OpenGL.