| 31 | namespace |
| 32 | { |
| 33 | RString GetCheatKeyName(int dikCode) |
| 34 | { |
| 35 | if (dikCode >= SDL_SCANCODE_A && dikCode <= SDL_SCANCODE_Z) |
| 36 | { |
| 37 | char text[2] = {static_cast<char>('A' + (dikCode - SDL_SCANCODE_A)), '\0'}; |
| 38 | return RString(text); |
| 39 | } |
| 40 | if (dikCode >= SDL_SCANCODE_1 && dikCode <= SDL_SCANCODE_9) |
| 41 | { |
| 42 | char text[2] = {static_cast<char>('1' + (dikCode - SDL_SCANCODE_1)), '\0'}; |
| 43 | return RString(text); |
| 44 | } |
| 45 | if (dikCode == SDL_SCANCODE_0) |
| 46 | return RString("0"); |
| 47 | return GetKeyName(dikCode); |
| 48 | } |
| 49 | } // namespace |
| 50 | |
| 51 | void KeyboardState::BufferKeyEvent(int scancode, bool down, DWORD timestamp) |
no test coverage detected