mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Merge pull request #460 from alexey-lysiuk/fix_center_cursor
[OSX] Fixed mouse cursor centering in fullscreen mode
This commit is contained in:
commit
f1cd22ef34
1 changed files with 2 additions and 5 deletions
|
@ -625,7 +625,7 @@ void CocoaVideo::SetFullscreenMode(const int width, const int height)
|
|||
[m_window setHidesOnDeactivate:YES];
|
||||
}
|
||||
|
||||
[m_window setFrame:displayRect display:YES];
|
||||
[m_window setFrame:screenFrame display:YES];
|
||||
[m_window setFrameOrigin:NSMakePoint(0.0f, 0.0f)];
|
||||
}
|
||||
|
||||
|
@ -1231,10 +1231,7 @@ NSSize I_GetContentViewSize(const NSWindow* const window)
|
|||
const NSView* const view = [window contentView];
|
||||
const NSSize frameSize = [view frame].size;
|
||||
|
||||
// TODO: figure out why [NSView frame] returns different values in "fullscreen" and in window
|
||||
// In "fullscreen" the result is multiplied by [NSScreen backingScaleFactor], but not in window
|
||||
|
||||
return (vid_hidpi && !fullscreen)
|
||||
return (vid_hidpi)
|
||||
? [view convertSizeToBacking:frameSize]
|
||||
: frameSize;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue