1
0
Fork 0

Display/Display: Cache position when entering fullscreen and restore when entering window mode again.

This commit is contained in:
Henrik Hautakoski 2022-09-12 22:24:19 +02:00
parent d34d20361d
commit d12d60b1ba
2 changed files with 13 additions and 0 deletions

View file

@ -4,6 +4,7 @@
#include "DisplayMode.h"
#include "DisplayDescription.h"
#include <Spectre/Math/Vector2.h>
#include <Spectre/Display/GLContext.h>
#include <cstdint>
#include <string>
@ -71,6 +72,10 @@ protected :
protected :
enum Mode m_fmode;
// Cache window position when entering fullscreen
// So it can be restored when returning to window mode.
Vector2u m_cachePos;
DisplayDescription m_description;
DisplayDescription m_cacheDesc;