From a0bd5bb1a5cb96586af24eaab0a4393fdb44127c Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Thu, 3 Oct 2019 13:26:09 +0200 Subject: [PATCH 1/1] get-video-driver --- irrlicht.scm | 6 +++++- irrlicht/bindings.scm | 11 ++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/irrlicht.scm b/irrlicht.scm index 39c8ca4..6da6ce9 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -24,7 +24,8 @@ #:use-module ((irrlicht bindings) #:prefix ffi:) #:use-module ((irrlicht bindings core) #:prefix ffi-core:) #:use-module ((irrlicht bindings video) #:prefix ffi-video:) - #:export (create-device)) + #:export (create-device + get-video-driver)) (define* (create-device #:optional (device-type 'software) @@ -46,3 +47,6 @@ (if fullscreen 1 0) (if stencilbuffer 1 0) (if vsync 1 0)))) + +(define (get-video-driver device) + (ffi:get-video-driver device)) diff --git a/irrlicht/bindings.scm b/irrlicht/bindings.scm index af85526..102494e 100644 --- a/irrlicht/bindings.scm +++ b/irrlicht/bindings.scm @@ -19,13 +19,18 @@ (define-module (irrlicht bindings) - #:use-module (system foreign) - #:export (create-device)) + #:use-module (system foreign)) (define cirr (dynamic-link "libCIrrlicht")) -(define create-device +(define-public create-device (pointer->procedure '* (dynamic-func "irr_createDevice" cirr) (list int '* uint32 int int int))) + +(define-public get-video-driver + (pointer->procedure + '* + (dynamic-func "irr_IrrlichtDevice_getVideoDriver" cirr) + (list '*))) -- 2.39.5