mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
make Input time functions return the correct type
This commit is contained in:
parent
39f7cb45b7
commit
ee8dc7e0fa
1 changed files with 5 additions and 5 deletions
|
@ -169,7 +169,7 @@ RB_METHOD(inputRepeatTime) {
|
|||
|
||||
int num = getButtonArg(&button);
|
||||
|
||||
return ULL2NUM(shState->input().repeatTime(num));
|
||||
return rb_float_new(shState->input().repeatTime(num));
|
||||
}
|
||||
|
||||
RB_METHOD(inputPressEx) {
|
||||
|
@ -250,10 +250,10 @@ RB_METHOD(inputRepeatTimeEx) {
|
|||
|
||||
if (SYMBOL_P(button)) {
|
||||
int num = getScancodeArg(&button);
|
||||
return ULL2NUM(shState->input().repeatTimeEx(num, 0));
|
||||
return rb_float_new(shState->input().repeatTimeEx(num, 0));
|
||||
}
|
||||
|
||||
return ULL2NUM(shState->input().repeatTimeEx(NUM2INT(button), 1));
|
||||
return rb_float_new(shState->input().repeatTimeEx(NUM2INT(button), 1));
|
||||
}
|
||||
|
||||
RB_METHOD(inputDir4) {
|
||||
|
@ -448,10 +448,10 @@ RB_METHOD(inputControllerRepeatTimeEx) {
|
|||
|
||||
if (SYMBOL_P(button)) {
|
||||
int num = getControllerButtonArg(&button);
|
||||
return rb_bool_new(shState->input().controllerRepeatTimeEx(num));
|
||||
return rb_float_new(shState->input().controllerRepeatTimeEx(num));
|
||||
}
|
||||
|
||||
return rb_bool_new(shState->input().controllerRepeatTimeEx(NUM2INT(button)));
|
||||
return rb_float_new(shState->input().controllerRepeatTimeEx(NUM2INT(button)));
|
||||
}
|
||||
|
||||
RB_METHOD(inputControllerRawButtonStates) {
|
||||
|
|
Loading…
Add table
Reference in a new issue