From cd8f5dc52129e82edcbf24ea881b52271f610fb3 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Fri, 22 Jun 2007 22:06:25 +0000 Subject: fix compilation by casting the %, {, }, | and ~ keycode "magic" numbers to Common::KeyCode svn-id: r27632 --- backends/platform/psp/osys_psp_gu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'backends/platform') diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp index 91bf71a2a9..a939229c84 100644 --- a/backends/platform/psp/osys_psp_gu.cpp +++ b/backends/platform/psp/osys_psp_gu.cpp @@ -62,8 +62,8 @@ unsigned char kbd_ascii[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ' Common::KeyCode kbd_code[] = {Common::KEYCODE_1, Common::KEYCODE_2, Common::KEYCODE_3, Common::KEYCODE_4, Common::KEYCODE_5, Common::KEYCODE_6, Common::KEYCODE_7, Common::KEYCODE_8, Common::KEYCODE_9, Common::KEYCODE_0, Common::KEYCODE_MINUS, Common::KEYCODE_EQUALS, Common::KEYCODE_LEFTBRACKET, Common::KEYCODE_RIGHTBRACKET, Common::KEYCODE_BACKSLASH, Common::KEYCODE_SEMICOLON, Common::KEYCODE_QUOTE, Common::KEYCODE_COMMA, Common::KEYCODE_PERIOD, Common::KEYCODE_SLASH, Common::KEYCODE_BACKQUOTE}; unsigned char kbd_ascii_cl[] = {'!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '{', '}', '|', ':', '"', '<', '>', '?', '~'}; -Common::KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, 37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, - Common::KEYCODE_PLUS, 123, 125, 124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, 126}; +Common::KeyCode kbd_code_cl[] = {Common::KEYCODE_EXCLAIM, Common::KEYCODE_AT, Common::KEYCODE_HASH, Common::KEYCODE_DOLLAR, (Common::KeyCode)37, Common::KEYCODE_CARET, Common::KEYCODE_AMPERSAND, Common::KEYCODE_ASTERISK, Common::KEYCODE_LEFTPAREN, Common::KEYCODE_RIGHTPAREN, Common::KEYCODE_UNDERSCORE, + Common::KEYCODE_PLUS, (Common::KeyCode)123, (Common::KeyCode)125, (Common::KeyCode)124, Common::KEYCODE_COLON, Common::KEYCODE_QUOTEDBL, Common::KEYCODE_LESS, Common::KEYCODE_GREATER, Common::KEYCODE_QUESTION, (Common::KeyCode)126}; #define CAPS_LOCK (1 << 0) #define SYMBOLS (1 << 1) @@ -555,11 +555,11 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) { case 0: event.kbd.flags = 0; event.kbd.ascii = 'a'+_keySelected-1; - event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); break; case CAPS_LOCK: event.kbd.ascii = 'A'+_keySelected-1; - event.kbd.keycode = Common::KEYCODE_a + _keySelected-1; + event.kbd.keycode = (Common::KeyCode)(Common::KEYCODE_a + _keySelected-1); event.kbd.flags = Common::KBD_SHIFT; break; case SYMBOLS: -- cgit v1.2.3