devkitPro / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
14 stars 13 forks source link

ogc: always give focus to the window #44

Closed mardy closed 8 months ago

mardy commented 8 months ago

We support only one window and that should receive the focus. Failing to do this breaks the delivering of Joystick and GameController events, unless the SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS hints is set (which is not, by default).

Some backends do this in CreateWindow(), some in ShowWindow(). In our case it doesn't really make a difference, but ShowWindow() sounds more correct.