mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- set minimum size for Cocoa window
This commit is contained in:
parent
43d472328c
commit
051521a898
1 changed files with 6 additions and 2 deletions
|
@ -494,9 +494,13 @@ void SystemGLFrameBuffer::SetWindowedMode()
|
|||
[m_window setHidesOnDeactivate:NO];
|
||||
}
|
||||
|
||||
const int minimumFrameWidth = MINIMUM_WIDTH;
|
||||
const int minimumFrameHeight = MINIMUM_HEIGHT + GetTitleBarHeight();
|
||||
const NSSize minimumFrameSize = NSMakeSize(minimumFrameWidth, minimumFrameHeight);
|
||||
[m_window setMinSize:minimumFrameSize];
|
||||
|
||||
const bool isFrameValid = win_x >= 0 && win_y >= 0
|
||||
&& win_w >= MINIMUM_WIDTH
|
||||
&& win_h - GetTitleBarHeight() >= MINIMUM_HEIGHT;
|
||||
&& win_w >= minimumFrameWidth && win_h >= minimumFrameHeight;
|
||||
const NSRect frameSize = isFrameValid
|
||||
? NSMakeRect(win_x, win_y, win_w, win_h)
|
||||
: NSMakeRect(0, 0, vid_defwidth, vid_defheight);
|
||||
|
|
Loading…
Reference in a new issue