Add flag detection for maximized and fullscreen to CVideo::window_state
This commit is contained in:
parent
20634adcfb
commit
eb1335b64b
1 changed files with 7 additions and 2 deletions
|
@ -732,8 +732,7 @@ bool CVideo::update_locked() const
|
|||
}
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
Uint8
|
||||
CVideo::window_state()
|
||||
Uint8 CVideo::window_state()
|
||||
{
|
||||
Uint8 state = 0;
|
||||
Uint32 flags = 0;
|
||||
|
@ -752,6 +751,12 @@ CVideo::window_state()
|
|||
if (flags & SDL_WINDOW_MOUSE_FOCUS) {
|
||||
state |= SDL_APPMOUSEFOCUS;
|
||||
}
|
||||
if (flags & SDL_WINDOW_MAXIMIZED) {
|
||||
state |= SDL_WINDOW_MAXIMIZED;
|
||||
}
|
||||
if (flags & SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
||||
state |= SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue