XboxDev / nxdk-sdl

SDL2 (adapted for original Xbox / nxdk toolchain)
Other
20 stars 8 forks source link

video: Add CreateWindow handler #36

Closed mborgerson closed 4 years ago

mborgerson commented 4 years ago

Adds a CreateWindow handler to Xbox video driver to:

  1. Check that only one window is created.
  2. Ensure the window dimensions match the framebuffer dimensions.
  3. Set keyboard/mouse focus.

This fixes an issue where SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS is required to get updates from joysticks. This problem was caused by the window not explicitly getting keyboard focus. This patch correctly gives the (one and only) window explicit keyboard focus, so this hint is no longer required.