SDL_GetAppState(3)

πŸ’– NAME πŸ’–

SDL_GetAppState β€” bestie, this is literally the function that tells you what state your app is in πŸ‘‘


✨ SYNOPSIS ✨

#include "SDL.h"

Uint8 SDL_GetAppState(void);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so SDL_GetAppState hands you back the current state of your application, no cap. and here's the tea β€” the value it returns is a bitwise combination of these three icons πŸ’…:

  • SDL_APPMOUSEFOCUS β€” the application has mouse focus πŸ–±οΈβœ¨
  • SDL_APPINPUTFOCUS β€” the application has keyboard focus βŒ¨οΈπŸ’–
  • SDL_APPACTIVE β€” the application is visible πŸ‘€πŸŒΈ

so like, they can stack, they can overlap, it's giving layered. check which bits are set and you know exactly what your app is going through 🫢


🌈 SEE ALSO 🌈

  • SDL_ActiveEvent

and that's the whole page, bestie πŸŽ€ this one comes from the SDL era, dated Tue 11 Sep 2001, 22:59 β€” iconic vintage behaviour fr fr, main character energy from day one πŸ’œβ­

πŸ“¦ where this page comes from