mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/uidriver/glfw: Fix unstable FPS on fullscreen on macOS
FPS was unstable on fullscreen mode i.e., when the view size is the same as the monitor size. By using a little different size view, FPS becomes stable. Updates #1745
This commit is contained in:
parent
11b9a4b161
commit
7be00d79e8
@ -45,7 +45,7 @@ func (v *view) update() {
|
||||
|
||||
func (v *view) usePresentsWithTransaction() bool {
|
||||
// Disable presentsWithTransaction on the fullscreen mode (#1745).
|
||||
return !v.vsyncDisabled && !v.fullscreen
|
||||
return !v.vsyncDisabled
|
||||
}
|
||||
|
||||
func (v *view) maximumDrawableCount() int {
|
||||
|
@ -63,6 +63,21 @@ package glfw
|
||||
// if (!origResizable) {
|
||||
// window.styleMask &= ~NSWindowStyleMaskResizable;
|
||||
// }
|
||||
//
|
||||
// if ((window.styleMask & NSWindowStyleMaskFullScreen) == 0) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// // Reduce the view height (#1745).
|
||||
// // https://stackoverflow.com/questions/27758027/sprite-kit-serious-fps-issue-in-full-screen-mode-on-os-x
|
||||
// NSView* view = [window contentView];
|
||||
// CGSize size = [view frame].size;
|
||||
// size.width--;
|
||||
// [view setFrameSize:size];
|
||||
//
|
||||
// // NSColor.blackColor (0, 0, 0, 1) didn't work.
|
||||
// // Use the transparent color instead.
|
||||
// [window setBackgroundColor: [NSColor colorWithSRGBRed:0 green:0 blue:0 alpha:0]];
|
||||
// }
|
||||
//
|
||||
// static void setNativeCursor(int cursorID) {
|
||||
|
Loading…
Reference in New Issue
Block a user