I am working on "Game" library for Content Library that is going to use USB keyboard connected to the TV-set.
Unfortunetely, I cannot force my application to get pressed key information.
Function SDL_PollEvent(&event) always returns false (or 0).
I am doing SDL initialisation by SDL_Init(SDL_INIT_VIDEO), then setting video mode by SDL_SetVideoMode(), then loading and displaying some bitmaps (which are displayed well), then waiting for keypresses.
USB HID drivers are loaded (can be checked by lsmod command) and keyboard seems to be working (you can light NumLock etc.)
Also, SDL_EnableUNICODE(1) doesn't help.
What is going on? What mistake do I make?
Code: Select all
SDL_Event event;
SDL_Surface *screen;
int quit = 0;
SDL_Init(SDL_INIT_VIDEO);
...
screen = SDL_SetVideoMode(1920/2,1080/2,32,0)
...
SDL_EnableUNICODE(1);
while (!quit)
{
if (SDL_PollEvent(&event)) ....never got here....;
...
}