mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
- implemented fullscreen toggle in Cocoa backend
Window size and position are not saved yet
This commit is contained in:
parent
67733ed6e6
commit
37a0c1d6c1
1 changed files with 10 additions and 1 deletions
|
@ -204,6 +204,7 @@ public:
|
||||||
|
|
||||||
virtual DFrameBuffer* CreateFrameBuffer();
|
virtual DFrameBuffer* CreateFrameBuffer();
|
||||||
|
|
||||||
|
static void ToggleFullscreen(bool yes);
|
||||||
static bool IsFullscreen();
|
static bool IsFullscreen();
|
||||||
static void UseHiDPI(bool hiDPI);
|
static void UseHiDPI(bool hiDPI);
|
||||||
static void SetCursor(NSCursor* cursor);
|
static void SetCursor(NSCursor* cursor);
|
||||||
|
@ -374,6 +375,14 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer()
|
||||||
return fb;
|
return fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CocoaVideo::ToggleFullscreen(bool yes)
|
||||||
|
{
|
||||||
|
if (CocoaVideo* const video = GetInstance())
|
||||||
|
{
|
||||||
|
video->SetMode(yes, video->m_hiDPI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool CocoaVideo::IsFullscreen()
|
bool CocoaVideo::IsFullscreen()
|
||||||
{
|
{
|
||||||
CocoaVideo* const video = GetInstance();
|
CocoaVideo* const video = GetInstance();
|
||||||
|
@ -555,7 +564,7 @@ bool SystemFrameBuffer::IsFullscreen()
|
||||||
|
|
||||||
void SystemFrameBuffer::ToggleFullscreen(bool yes)
|
void SystemFrameBuffer::ToggleFullscreen(bool yes)
|
||||||
{
|
{
|
||||||
SetMode(...); // todo
|
CocoaVideo::ToggleFullscreen(yes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue