Skip to content

Custom Window Flags

Ash edited this page Jan 5, 2020 · 2 revisions

We use some extra flags for SDL_CreateWindow to allow specifying whether a window should be rendered on the TV, Gamepad or both.

In a nutshell:

  • By default, a window will render to both the TV and Gamepad. This is a mirrored window.
  • If an application passes SDL_WINDOW_WIIU_TV_ONLY or SDL_WINDOW_WIIU_GAMEPAD_ONLY when creating a window, it will only render to the TV or Gamepad respectively. This is a non-mirrored window.

Currently, SDL can only render one window per display. This means:

  • One mirrored window per application.
  • If you have a mirrored window, you can't have any non-mirrored windows.
  • You can have a maximum of two non-mirrored windows - one for each display.

Note that by default, SDL_RENDERER_PRESENTVSYNC is enabled for all renderers. On Wii U, this can result in each window individually waiting for the vsync - for example, waiting once in the TV's SDL_RenderPresent call, then waiting again in the Gamepad's call, resulting in an effective framerate of 30fps. At the time of writing, the patch that allows apps to work around this issue is not in the latest release (2.0.9-wiiu2). This will be possible to work around by setting SDL_HINT_RENDER_VSYNC to false before creating the second renderer, or doing so for both and having the app use its own framerate limiting logic.

Clone this wiki locally