-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Description
Currently, the IsKeypad function in inputsystem is implemented as:
source-sdk-2013/src/public/inputsystem/ButtonCode.h
Lines 311 to 314 in 2d3a6ef
| inline bool IsKeypad( ButtonCode_t code ) | |
| { | |
| return ( code >= MOUSE_FIRST ) && ( code <= KEY_PAD_DECIMAL ); | |
| } |
This code doesn't work, because the MOUSE_FIRST enum value checked for the lower bound is larger than the KEY_PAD_DECIMAL value that is checked for the upper bound. Therefore, this function currently returns false for all inputs.
This is probably a typo, and the lower bound should be checked against KEY_PAD_0 instead of MOUSE_FIRST:
return ( code >= KEY_PAD_0 ) && ( code <= KEY_PAD_DECIMAL );Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels