Question

Is there an SDL_ACTIVEEVENT equivalent in SDL 2.0? How do we handle SDL_APPMOUSEFOCUS and SDL_APPINPUTFOCUS?

Was it helpful?

Solution

SDL2's SDL_WindowEvent:

  • SDL_APPMOUSEFOCUS maps to SDL_WINDOWEVENT_ENTER and SDL_WINDOWEVENT_LEAVE

  • SDL_APPINPUTFOCUS maps to SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top