mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-12-03 17:32:54 +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();
|
||||
|
||||
static void ToggleFullscreen(bool yes);
|
||||
static bool IsFullscreen();
|
||||
static void UseHiDPI(bool hiDPI);
|
||||
static void SetCursor(NSCursor* cursor);
|
||||
|
@ -374,6 +375,14 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer()
|
|||
return fb;
|
||||
}
|
||||
|
||||
void CocoaVideo::ToggleFullscreen(bool yes)
|
||||
{
|
||||
if (CocoaVideo* const video = GetInstance())
|
||||
{
|
||||
video->SetMode(yes, video->m_hiDPI);
|
||||
}
|
||||
}
|
||||
|
||||
bool CocoaVideo::IsFullscreen()
|
||||
{
|
||||
CocoaVideo* const video = GetInstance();
|
||||
|
@ -555,7 +564,7 @@ bool SystemFrameBuffer::IsFullscreen()
|
|||
|
||||
void SystemFrameBuffer::ToggleFullscreen(bool yes)
|
||||
{
|
||||
SetMode(...); // todo
|
||||
CocoaVideo::ToggleFullscreen(yes);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue