diff options
| author | Tom Black <[email protected]> | 2015-12-25 23:18:53 -0600 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2015-12-25 23:18:53 -0600 |
| commit | cbfce01bce4bd082b238a378bb11868e76b4a6d6 (patch) | |
| tree | ebf8739fa6dd8d72332f1e8a12223627a47840d0 /ext | |
| parent | 4b4ceac1d95773f8c054cd04e287af9f65c29dec (diff) | |
| download | ruby2d-cbfce01bce4bd082b238a378bb11868e76b4a6d6.tar.gz ruby2d-cbfce01bce4bd082b238a378bb11868e76b4a6d6.zip | |
Store frame rate
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/ruby2d/ruby2d.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index 0681e27..965f863 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -112,6 +112,9 @@ void update() { rb_iv_set(self, "@mouse_x", INT2NUM(window->mouse.x)); rb_iv_set(self, "@mouse_y", INT2NUM(window->mouse.y)); + // Store frame rate + rb_iv_set(self, "@fps", INT2NUM(window->fps)); + // Call update proc, `window.update` rb_funcall(self, rb_intern("update_callback"), 0); } |
