Getting control of keyboard


Tam Toucan

Still Fresh
Joined
Feb 4, 2011
Messages
96
I'm just starting trying to get something running on the Pandora and I've got it drawing fine, but when I press keys they appear in terminal that I'm running the exe from (causing the screen to flicker as it draws both). Also the mouse pointer is still visible and pressing the Pandora key brings up the menu.


I'm using



Code:
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER);

GLES2D_InitVideo(640,480,1,1,0,VIDEO_FB);

SDL_ShowCursor(0);
to init the screen and then SDL_PollEvent, but I don't get any SDL_KEYDOWN events. In fact I don't get any events other than SDL_QUIT when I hit CTRL-C.


Any pointers greatly appreciated.


Thanks!


BTW I'm completely new to GLES2D/SDL/Pandora, everything I've done before has been openGL+GLFW.
 
Reading GLES2D allowed me to get this : GLES2D doesnt init an SDL Screen.


So SDL have no window to grab input from.


In an other news GLES2D provide you it's own event manager. see the examples to know more.
 
I didn't know about GLES2D...


I'm currently porting my app, and it draws directly to a memory pointer (which points to a surface, 800x480x8). At present, this pointer is an SDL surface - and it's very slow, what with the Pandora only having one CPU core. Would GLES2D help in this case?


D.
 
Back
Top