summaryrefslogtreecommitdiffhomepage
path: root/ext
diff options
context:
space:
mode:
authorTom Black <[email protected]>2016-07-18 00:35:51 -0500
committerTom Black <[email protected]>2016-07-18 00:35:51 -0500
commit721986fea456997a5fc7d26f3fc6bb893b6d191c (patch)
treeae500796aedcefff9c261a6c6e36c606c5bfbfee /ext
parentef5a0a34e448dc6096495c85bfb173a5c693d0a1 (diff)
downloadruby2d-721986fea456997a5fc7d26f3fc6bb893b6d191c.tar.gz
ruby2d-721986fea456997a5fc7d26f3fc6bb893b6d191c.zip
Clean up window attributes
Diffstat (limited to 'ext')
-rw-r--r--ext/ruby2d/ruby2d.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c
index 52b852a..300198d 100644
--- a/ext/ruby2d/ruby2d.c
+++ b/ext/ruby2d/ruby2d.c
@@ -257,6 +257,7 @@ static void render() {
static VALUE ruby2d_show(VALUE s) {
self = s;
+ // Get window attributes
char *title = RSTRING_PTR(rb_iv_get(self, "@title"));
int width = NUM2INT(rb_iv_get(self, "@width"));
int height = NUM2INT(rb_iv_get(self, "@height"));
@@ -298,11 +299,11 @@ static VALUE ruby2d_show(VALUE s) {
title, width, height, update, render, flags
);
- window->on_key = on_key;
- window->on_key_down = on_key_down;
- window->on_controller = on_controller;
window->viewport.width = viewport_width;
window->viewport.height = viewport_height;
+ window->on_key = on_key;
+ window->on_key_down = on_key_down;
+ window->on_controller = on_controller;
S2D_Show(window);