From dbb2249ff30e5a730da0426016b4e2d565a463f9 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sun, 24 Aug 2014 07:20:44 +0200 Subject: [PATCH] MRI: Graphics: Bind resize_screen --- binding-mri/graphics-binding.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/binding-mri/graphics-binding.cpp b/binding-mri/graphics-binding.cpp index 876f766..8125837 100644 --- a/binding-mri/graphics-binding.cpp +++ b/binding-mri/graphics-binding.cpp @@ -167,6 +167,18 @@ RB_METHOD(graphicsSnapToBitmap) return obj; } +RB_METHOD(graphicsResizeScreen) +{ + RB_UNUSED_PARAM; + + int width, height; + rb_get_args(argc, argv, "ii", &width, &height RB_ARG_END); + + shState->graphics().resizeScreen(width, height); + + return Qnil; +} + DEF_GRA_PROP_I(Brightness) #endif @@ -199,6 +211,7 @@ void graphicsBindingInit() _rb_define_module_function(module, "fadeout", graphicsFadeout); _rb_define_module_function(module, "fadein", graphicsFadein); _rb_define_module_function(module, "snap_to_bitmap", graphicsSnapToBitmap); + _rb_define_module_function(module, "resize_screen", graphicsResizeScreen); INIT_GRA_PROP_BIND( Brightness, "brightness" ); #endif