From 0c07b0db5cf3aec92ae8838490d6a83e5416d81c Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Fri, 15 May 2020 08:23:30 +0200 Subject: [PATCH] yield-device --- examples/02-quake3map.scm | 2 +- irrlicht.scm | 3 ++- irrlicht/device.scm | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/02-quake3map.scm b/examples/02-quake3map.scm index 2087401..4d42221 100644 --- a/examples/02-quake3map.scm +++ b/examples/02-quake3map.scm @@ -89,7 +89,7 @@ (set-window-caption! device caption)) (set! last-fps fps)))) (else - ((@ (irrlicht) yield) device)))) + (yield-device device)))) ;; delete device (drop! device) diff --git a/irrlicht.scm b/irrlicht.scm index e823ac0..9724a80 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -55,7 +55,8 @@ set-md2-animation! set-position! set-visible! - set-window-caption!)) + set-window-caption! + yield-device)) ;; Merged methods have to be exported apart (re-export draw-all) diff --git a/irrlicht/device.scm b/irrlicht/device.scm index a9aa82b..b18a58e 100644 --- a/irrlicht/device.scm +++ b/irrlicht/device.scm @@ -91,5 +91,9 @@ ((get-irrlicht-proc "setWindowCaption" device) device text)) +(define-method (yield-device (device )) + (let ((yield (get-irrlicht-proc "yield" device))) + (yield device))) + (export create-device get-cursor-control get-file-system get-gui-environment get-scene-manager - get-video-driver is-window-active? run set-window-caption!) + get-video-driver is-window-active? run set-window-caption! yield-device) -- 2.39.5