From b798113da8aba45883219f6edf1c9deccd96a706 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 17 Nov 2000 21:34:07 +0000 Subject: [PATCH] in_sdl.c and in_svgalib.c now use the new Key_Event api properly --- source/in_sdl.c | 12 ++++++------ source/in_svgalib.c | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/in_sdl.c b/source/in_sdl.c index 285c6a2..a7e5b73 100644 --- a/source/in_sdl.c +++ b/source/in_sdl.c @@ -169,7 +169,7 @@ IN_SendKeyEvents (void) // If we're not directly handled and still above 255 // just force it to 0 if(sym > 255) sym = 0; - Key_Event(sym, state); + Key_Event(sym, -1, state); break; case SDL_MOUSEBUTTONDOWN: @@ -184,14 +184,14 @@ IN_SendKeyEvents (void) case 1: case 2: case 3: - Key_Event(K_MOUSE1 + but - 1, event.type + Key_Event(K_MOUSE1 + but - 1, 0, event.type == SDL_MOUSEBUTTONDOWN); break; case 4: - Key_Event(K_MWHEELUP, event.type == SDL_MOUSEBUTTONDOWN); + Key_Event(K_MWHEELUP, 0, event.type == SDL_MOUSEBUTTONDOWN); break; case 5: - Key_Event(K_MWHEELDOWN, event.type == SDL_MOUSEBUTTONDOWN); + Key_Event(K_MWHEELDOWN, 0, event.type == SDL_MOUSEBUTTONDOWN); break; } break; @@ -286,10 +286,10 @@ void IN_Frame(void) mouse_buttonstate = (i & ~0x06) | ((i & 0x02)<<1) | ((i & 0x04)>>1); for (i=0 ; i<3 ; i++) { if ( (mouse_buttonstate & (1< 0) { - Key_Event(K_MWHEELUP, 1); - Key_Event(K_MWHEELUP, 0); + Key_Event(K_MWHEELUP, 0, 1); + Key_Event(K_MWHEELUP, 0, 0); } else if (drx < 0) { - Key_Event(K_MWHEELDOWN, 1); - Key_Event(K_MWHEELDOWN, 0); + Key_Event(K_MWHEELDOWN, 0, 1); + Key_Event(K_MWHEELDOWN, 0, 0); } } @@ -318,24 +318,24 @@ void IN_Commands(void) /* Perform button actions */ if ((mouse_buttonstate & MOUSE_LEFTBUTTON) && !(mouse_oldbuttonstate & MOUSE_LEFTBUTTON)) - Key_Event (K_MOUSE1, true); + Key_Event (K_MOUSE1, 0, true); else if (!(mouse_buttonstate & MOUSE_LEFTBUTTON) && (mouse_oldbuttonstate & MOUSE_LEFTBUTTON)) - Key_Event (K_MOUSE1, false); + Key_Event (K_MOUSE1, 0, false); if ((mouse_buttonstate & MOUSE_RIGHTBUTTON) && !(mouse_oldbuttonstate & MOUSE_RIGHTBUTTON)) - Key_Event (K_MOUSE2, true); + Key_Event (K_MOUSE2, 0, true); else if (!(mouse_buttonstate & MOUSE_RIGHTBUTTON) && (mouse_oldbuttonstate & MOUSE_RIGHTBUTTON)) - Key_Event (K_MOUSE2, false); + Key_Event (K_MOUSE2, 0, false); if ((mouse_buttonstate & MOUSE_MIDDLEBUTTON) && !(mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON)) - Key_Event (K_MOUSE3, true); + Key_Event (K_MOUSE3, 0, true); else if (!(mouse_buttonstate & MOUSE_MIDDLEBUTTON) && (mouse_oldbuttonstate & MOUSE_MIDDLEBUTTON)) - Key_Event (K_MOUSE3, false); + Key_Event (K_MOUSE3, 0, false); mouse_oldbuttonstate = mouse_buttonstate; }