From cf9ecf5f581d2c9688e369b4b2ed49077c48f63e Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Sun, 19 Apr 2020 20:07:06 +0200 Subject: [PATCH] set-resizable! --- src/device.cpp | 10 ++++++++++ src/device.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/device.cpp b/src/device.cpp index 96442c7..cb1e4a4 100644 --- a/src/device.cpp +++ b/src/device.cpp @@ -41,6 +41,7 @@ extern "C" { DEFINE_GSUBR ("get-timer", 1, 0, 0, irr_getTimer); DEFINE_GSUBR ("is-window-active?", 1, 0, 0, irr_isWindowActive); DEFINE_GSUBR ("run", 1, 0, 0, irr_run); + DEFINE_GSUBR ("set-resizable!", 2, 0, 0, irr_setResizable); DEFINE_GSUBR ("set-window-caption!", 2, 0, 0, irr_setWindowCaption); DEFINE_GSUBR ("yield", 1, 0, 0, irr_yield); } @@ -103,6 +104,15 @@ extern "C" { return scm_from_bool (device->run ()); } + SCM + irr_setResizable (SCM wrapped_device, + SCM resize) + { + irr::IrrlichtDevice* device = unwrap_device (wrapped_device); + device->setResizable (scm_to_bool (resize)); + return SCM_UNSPECIFIED; + } + SCM irr_setWindowCaption (SCM wrapped_device, SCM text) diff --git a/src/device.h b/src/device.h index 1a9046d..29bc783 100644 --- a/src/device.h +++ b/src/device.h @@ -46,6 +46,10 @@ extern "C" { SCM irr_run (SCM wrapped_device); + SCM + irr_setResizable (SCM wrapped_device, + SCM resize); + SCM irr_setWindowCaption (SCM wrapped_device, SCM text); -- 2.39.2