diff options
| author | Tom Black <[email protected]> | 2017-03-02 19:34:48 -0500 |
|---|---|---|
| committer | Tom Black <[email protected]> | 2017-03-02 19:34:48 -0500 |
| commit | 993a22d3408135468824bb57b5cdb891694cc590 (patch) | |
| tree | 2ae5826341c355c57d52f5b71f687e518fd9d48f /ext | |
| parent | 16ec84ae91d2cca94a37a96de24e9e50fe330460 (diff) | |
| download | ruby2d-993a22d3408135468824bb57b5cdb891694cc590.tar.gz ruby2d-993a22d3408135468824bb57b5cdb891694cc590.zip | |
Update controller test
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/ruby2d/ruby2d.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c index ff506c6..0bc4214 100644 --- a/ext/ruby2d/ruby2d.c +++ b/ext/ruby2d/ruby2d.c @@ -456,10 +456,10 @@ void on_mouse(int x, int y) { * Simple 2D `on_controller` input callback function */ static void on_controller(int which, bool is_axis, int axis, int val, bool is_btn, int btn, bool pressed) { - r_funcall(ruby2d_window, "controller_callback", 6, + r_funcall(ruby2d_window, "controller_callback", 7, INT2NUM(which), is_axis ? R_TRUE : R_FALSE, INT2NUM(axis), INT2NUM(val), - is_btn ? R_TRUE : R_FALSE, INT2NUM(btn) + is_btn ? R_TRUE : R_FALSE, INT2NUM(btn), pressed ? R_TRUE : R_FALSE ); } |
