diff options
author | Max Horn | 2007-06-24 18:49:48 +0000 |
---|---|---|
committer | Max Horn | 2007-06-24 18:49:48 +0000 |
commit | 0b1ce0774a8891081c380cf8b822cfe2d4f440d5 (patch) | |
tree | 2f4e57d911727bb47cbf004797716c48ff6e68ba /backends/platform | |
parent | 0a7022709178011ac977bb477e3589d8b26ceb42 (diff) | |
download | scummvm-rg350-0b1ce0774a8891081c380cf8b822cfe2d4f440d5.tar.gz scummvm-rg350-0b1ce0774a8891081c380cf8b822cfe2d4f440d5.tar.bz2 scummvm-rg350-0b1ce0774a8891081c380cf8b822cfe2d4f440d5.zip |
Use keycodes instead of the (bad) ascii code for function keys in the DC backend
svn-id: r27695
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/dc/input.cpp | 6 | ||||
-rw-r--r-- | backends/platform/dc/selector.cpp | 2 | ||||
-rw-r--r-- | backends/platform/dc/softkbd.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp index f3638a28db..bb4a2b9ec0 100644 --- a/backends/platform/dc/input.cpp +++ b/backends/platform/dc/input.cpp @@ -48,7 +48,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = Common::ASCII_F5; + if(!(buttons & 8)) newkey = Common::KEYCODE_F5; else if(!(buttons & 512)) newkey = ' '; else if(!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15]; @@ -69,7 +69,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, if(!(buttons & 4)) lmb++; if(!(buttons & 2)) rmb++; - if(!(buttons & 8)) newkey = Common::ASCII_F5; + if(!(buttons & 8)) newkey = Common::KEYCODE_F5; mouse_x += pad->cond.mouse.axis1; mouse_y += pad->cond.mouse.axis2; @@ -101,7 +101,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y, "=¯`{ }+*½<>?" : "-^@[ ];:§,./")[key - 0x2d]; else if(key >= 0x3a && key <= 0x43) - newkey = key+(Common::ASCII_F1-0x3a); + newkey = key+(Common::KEYCODE_F1-0x3a); else if(key >= 0x54 && key <= 0x57) newkey = "/*-+"[key-0x54]; else switch(key) { diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp index 8262a39614..b082afabf5 100644 --- a/backends/platform/dc/selector.cpp +++ b/backends/platform/dc/selector.cpp @@ -364,7 +364,7 @@ int gameMenu(Game *games, int num_games) event = handleInput(locked_get_pads(), mousex, mousey, shiftFlags); setimask(mask); - if(event==-Common::EVENT_LBUTTONDOWN || event==13 || event==Common::ASCII_F5) { + if(event==-Common::EVENT_LBUTTONDOWN || event==Common::KEYCODE_ENTER || event==Common::KEYCODE_F5) { int selected_game = top_game + selector_pos; for(int fade=0; fade<=256; fade+=4) { diff --git a/backends/platform/dc/softkbd.cpp b/backends/platform/dc/softkbd.cpp index 58b492f6db..79363713a5 100644 --- a/backends/platform/dc/softkbd.cpp +++ b/backends/platform/dc/softkbd.cpp @@ -52,7 +52,7 @@ static const char key_names[] = static const short key_codes[] = { - Common::KEYCODE_ESCAPE, Common::ASCII_F1, Common::ASCII_F2, Common::ASCII_F3, Common::ASCII_F4, Common::ASCII_F5, Common::ASCII_F6, Common::ASCII_F7, Common::ASCII_F8, Common::ASCII_F9, Common::ASCII_F10, + Common::KEYCODE_ESCAPE, Common::KEYCODE_F1, Common::KEYCODE_F2, Common::KEYCODE_F3, Common::KEYCODE_F4, Common::KEYCODE_F5, Common::KEYCODE_F6, Common::KEYCODE_F7, Common::KEYCODE_F8, Common::KEYCODE_F9, Common::KEYCODE_F10, K('1','!'), K('2','"'), K('3','#'), K('4','$'), K('5','%'), K('6','&'), K('7','\''), K('8','('), K('9',')'), K('0','~'), K('-','='), K('q','Q'), K('w','W'), K('e','E'), K('r','R'), K('t','T'), |