diff options
author | wm4 <wm4@nowhere> | 2013-02-12 01:34:04 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-02-12 10:27:00 +0100 |
commit | 75e6584ab3b06a02be37b447c397271c0d120b01 (patch) | |
tree | bf912a16b719397df464fde4d46e6b84144a4029 /osdep/getch2-win.c | |
parent | 3ded26ccba9831ef4b4a2b22f2989fd9d5e72964 (diff) | |
download | mpv-75e6584ab3b06a02be37b447c397271c0d120b01.tar.bz2 mpv-75e6584ab3b06a02be37b447c397271c0d120b01.tar.xz |
Prefix keycode defines with MP_
Do this to reduce conflicts with <linux/input.h>, 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)
Diffstat (limited to 'osdep/getch2-win.c')
-rw-r--r-- | osdep/getch2-win.c | 28 |
1 files changed, 14 insertions, 14 deletions
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); |