mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
internal/uidriver/glfw: Better implementation of isNativeFullscreen
The old implementation can return false when the window is not active.
This commit is contained in:
parent
15ac69b8d5
commit
4482301882
@ -42,9 +42,12 @@ package glfw
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// static bool isNativeFullscreen() {
|
// static bool isNativeFullscreen(uintptr_t windowPtr) {
|
||||||
// return [[NSApplication sharedApplication] currentSystemPresentationOptions] &
|
// if (!windowPtr) {
|
||||||
// NSApplicationPresentationFullScreen;
|
// return false;
|
||||||
|
// }
|
||||||
|
// NSWindow* window = (NSWindow*)windowPtr;
|
||||||
|
// return (window.styleMask & NSWindowStyleMaskFullScreen) != 0;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// static void setNativeCursor(int cursorID) {
|
// static void setNativeCursor(int cursorID) {
|
||||||
@ -118,7 +121,7 @@ func (u *UserInterface) nativeWindow() uintptr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) isNativeFullscreen() bool {
|
func (u *UserInterface) isNativeFullscreen() bool {
|
||||||
return bool(C.isNativeFullscreen())
|
return bool(C.isNativeFullscreen(C.uintptr_t(u.window.GetCocoaWindow())))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) setNativeCursor(shape driver.CursorShape) {
|
func (u *UserInterface) setNativeCursor(shape driver.CursorShape) {
|
||||||
|
Loading…
Reference in New Issue
Block a user