2
\$\begingroup\$

Is there a replacement for SDL_GetAppState function in SDL2 from older SDL versions? Why was it removed? I want to use it so I can check if the user has focused the framebuffer window or not.

I found it in the documentation of the SDL 1.2.15 (Documentation page) but it seems like it disappeared in SDL2.X.

\$\endgroup\$
2
\$\begingroup\$

You can use SDL_GetWindowFlags, it returns similar flags (among others) that you can use to check if the window has mouse/input focus.

The API has changed because SDL2 supports multiple windows.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.