From 36754d58e1e17c11cc243f896d63cd9e1daf95ed Mon Sep 17 00:00:00 2001 From: eiko Date: Fri, 30 Mar 2018 12:07:15 -0400 Subject: Enable setting and getting custom fps_cap --- ext/ruby2d/ruby2d.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext') diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 888c053..b44ba58 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -933,6 +933,7 @@ static R_VAL ruby2d_window_ext_show(R_VAL self) { char *title = RSTRING_PTR(r_iv_get(self, "@title")); int width = NUM2INT(r_iv_get(self, "@width")); int height = NUM2INT(r_iv_get(self, "@height")); + int fps_cap = NUM2INT(r_iv_get(self, "@fps_cap")); int flags = 0; // Get window flags @@ -965,6 +966,7 @@ static R_VAL ruby2d_window_ext_show(R_VAL self) { window->viewport.width = viewport_width; window->viewport.height = viewport_height; + window->fps_cap = fps_cap; window->on_key = on_key; window->on_mouse = on_mouse; window->on_controller = on_controller; -- cgit v1.2.3