diff options
| author | arngo <[email protected]> | 2022-01-20 12:52:56 -0500 |
|---|---|---|
| committer | arngo <[email protected]> | 2022-01-20 12:52:56 -0500 |
| commit | 5928706912d852619bc1f68b0caa01ef3630d564 (patch) | |
| tree | 11555b087c86a828b6319761b00cb2c83ee084fe /src | |
| parent | 07779824f6c6535c9d45aa2384475ca75fc1895e (diff) | |
| download | mruby-raylib-5928706912d852619bc1f68b0caa01ef3630d564.tar.gz mruby-raylib-5928706912d852619bc1f68b0caa01ef3630d564.zip | |
return bool values
Diffstat (limited to 'src')
| -rw-r--r-- | src/raylib.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/raylib.c b/src/raylib.c index 3768848..ae076ec 100644 --- a/src/raylib.c +++ b/src/raylib.c @@ -155,7 +155,7 @@ mrb_is_key_pressed(mrb_state* mrb, mrb_value self) { mrb_int key; mrb_get_args(mrb, "i", &key); - return mrb_obj_value(IsKeyPressed(key)); + return mrb_bool_value(IsKeyPressed(key)); } static mrb_value @@ -163,7 +163,7 @@ mrb_is_key_down(mrb_state* mrb, mrb_value self) { mrb_int key; mrb_get_args(mrb, "i", &key); - return mrb_obj_value(IsKeyDown(key)); + return mrb_bool_value(IsKeyDown(key)); } @@ -172,7 +172,7 @@ mrb_is_key_released(mrb_state* mrb, mrb_value self) { mrb_int key; mrb_get_args(mrb, "i", &key); - return mrb_obj_value(IsKeyReleased(key)); + return mrb_bool_value(IsKeyReleased(key)); } static mrb_value @@ -180,7 +180,7 @@ mrb_is_key_up(mrb_state* mrb, mrb_value self) { mrb_int key; mrb_get_args(mrb, "i", &key); - return mrb_obj_value(IsKeyUp(key)); + return mrb_bool_value(IsKeyUp(key)); } static mrb_value @@ -267,7 +267,7 @@ mrb_call_main_loop(mrb_state* mrb, mrb_value self) { static mrb_value mrb_window_should_close(mrb_state* mrb, mrb_value self) { - return mrb_obj_value(WindowShouldClose()); + return mrb_bool_value(WindowShouldClose()); } #if defined(PLATFORM_WEB) |
