From 75e6584ab3b06a02be37b447c397271c0d120b01 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 12 Feb 2013 01:34:04 +0100 Subject: Prefix keycode defines with MP_ Do this to reduce conflicts with , which contains some conflicting defines. This changes the meaning of MP_KEY_DOWN: KEY_DOWN is renamed to MP_KEY_DOWN (cursor down key) MP_KEY_DOWN is renamed to MP_KEY_STATE_DOWN (modifier for key down state) --- osdep/getch2-win.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'osdep/getch2-win.c') diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 4bef70b418..2edb537076 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -108,37 +108,37 @@ static int getch2_internal(void) switch(eventbuffer[i].Event.KeyEvent.wVirtualKeyCode) { case VK_HOME: - return KEY_HOME; + return MP_KEY_HOME; case VK_END: - return KEY_END; + return MP_KEY_END; case VK_DELETE: - return KEY_DEL; + return MP_KEY_DEL; case VK_INSERT: - return KEY_INS; + return MP_KEY_INS; case VK_BACK: - return KEY_BS; + return MP_KEY_BS; case VK_PRIOR: - return KEY_PGUP; + return MP_KEY_PGUP; case VK_NEXT: - return KEY_PGDWN; + return MP_KEY_PGDWN; case VK_RETURN: - return KEY_ENTER; + return MP_KEY_ENTER; case VK_ESCAPE: - return KEY_ESC; + return MP_KEY_ESC; case VK_LEFT: - return KEY_LEFT; + return MP_KEY_LEFT; case VK_UP: - return KEY_UP; + return MP_KEY_UP; case VK_RIGHT: - return KEY_RIGHT; + return MP_KEY_RIGHT; case VK_DOWN: - return KEY_DOWN; + return MP_KEY_DOWN; case VK_SHIFT: continue; } /*check for function keys*/ if(0x87 >= eventbuffer[i].Event.KeyEvent.wVirtualKeyCode && eventbuffer[i].Event.KeyEvent.wVirtualKeyCode >= 0x70) - return KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70; + return MP_KEY_F + 1 + eventbuffer[i].Event.KeyEvent.wVirtualKeyCode - 0x70; /*only characters should be remaining*/ //printf("getch2: YOU PRESSED \"%c\" \n",eventbuffer[i].Event.KeyEvent.uChar.AsciiChar); -- cgit v1.2.3