sokol: expose the toggle_fullscreen and is_fullscreen functions (#11339)

pull/11353/head
penguindark 2021-08-30 16:10:14 +02:00 committed by GitHub
parent 9496fcdfe1
commit 8dcb27a11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -233,3 +233,15 @@ pub fn win32_get_hwnd() voidptr {
pub fn android_get_native_activity() voidptr { pub fn android_get_native_activity() voidptr {
return voidptr(C.sapp_android_get_native_activity()) return voidptr(C.sapp_android_get_native_activity())
} }
// Toggle full screen
[inline]
pub fn toggle_fullscreen() {
C.sapp_toggle_fullscreen()
}
// Check if full screen rendering
[inline]
pub fn is_fullscreen() bool {
return C.sapp_is_fullscreen()
}

View File

@ -103,3 +103,9 @@ fn C.sapp_win32_get_hwnd() voidptr
// Android: get native activity handle // Android: get native activity handle
fn C.sapp_android_get_native_activity() voidptr fn C.sapp_android_get_native_activity() voidptr
// Toggle full screen
fn C.sapp_toggle_fullscreen()
// Check if full screen rendering
fn C.sapp_is_fullscreen() bool