MRI-Binding: Input constants are symbols in RGSS3

This commit is contained in:
Jonas Kulla 2014-08-07 17:13:10 +02:00
parent 656c5099ea
commit 88bb92aadc
3 changed files with 83 additions and 38 deletions

View file

@ -41,6 +41,8 @@ static mrb_int getButtonArg(mrb_state *mrb, mrb_value self)
mrb_sym sym;
mrb_get_args(mrb, "n", &sym);
// FIXME: This is wrong, Input:: constants should be
// symbols in RGSS3, see MRI binding for reference
if (mrb_const_defined(mrb, self, sym))
num = mrb_fixnum(mrb_const_get(mrb, self, sym));
else