diff --git a/prboom2/src/SDL/i_video.c b/prboom2/src/SDL/i_video.c index 18c897fe4..0cfc965e4 100644 --- a/prboom2/src/SDL/i_video.c +++ b/prboom2/src/SDL/i_video.c @@ -292,8 +292,6 @@ int I_SDLtoDoomMouseState(Uint32 buttonstate) ; } -static event_t delay_event; - static void I_GetEvent(void) { event_t event; @@ -301,8 +299,6 @@ static void I_GetEvent(void) SDL_Event SDLEvent; SDL_Event *Event = &SDLEvent; - I_DelayEvent(); - while (SDL_PollEvent(Event)) { switch (Event->type) { @@ -386,12 +382,12 @@ static void I_GetEvent(void) // post a button down event event.data1.i = button; - event.type = ev_mouseb_down; + event.type = ev_keydown; D_PostEvent(&event); - // hold button for one tic, required for checks in G_BuildTiccmd - delay_event.data1.i = button; - delay_event.type = ev_mouseb_up; + event.data1.i = button; + event.type = ev_keyup; + D_PostEvent(&event); } break; @@ -433,16 +429,6 @@ static void I_GetEvent(void) } } -// Pulled from Woof -void I_DelayEvent(void) -{ - if (delay_event.data1.i) - { - D_PostEvent(&delay_event); - delay_event.data1.i = 0; - } -} - // // I_StartTic // diff --git a/prboom2/src/am_map.c b/prboom2/src/am_map.c index f91f9c5c9..bb3615290 100644 --- a/prboom2/src/am_map.c +++ b/prboom2/src/am_map.c @@ -1073,7 +1073,7 @@ dboolean AM_Responder } else if ( dsda_InputActivated(dsda_input_map_zoomout) || - (map_wheel_zoom && ev->type == ev_mouseb_down && ev->data1.i == KEYD_MWHEELDOWN) + (map_wheel_zoom && ev->type == ev_keydown && ev->data1.i == KEYD_MWHEELDOWN) ) { mtof_zoommul = M_ZOOMOUT; @@ -1085,7 +1085,7 @@ dboolean AM_Responder } else if ( dsda_InputActivated(dsda_input_map_zoomin) || - (map_wheel_zoom && ev->type == ev_mouseb_down && ev->data1.i == KEYD_MWHEELUP) + (map_wheel_zoom && ev->type == ev_keydown && ev->data1.i == KEYD_MWHEELUP) ) { mtof_zoommul = M_ZOOMIN; @@ -1164,7 +1164,7 @@ dboolean AM_Responder dsda_InputDeactivated(dsda_input_map_zoomout) || dsda_InputDeactivated(dsda_input_map_zoomin) || ( - map_wheel_zoom && ev->type == ev_mouseb_up && + map_wheel_zoom && ev->type == ev_keyup && (ev->data1.i == KEYD_MWHEELDOWN || ev->data1.i == KEYD_MWHEELUP) ) ) diff --git a/prboom2/src/d_event.h b/prboom2/src/d_event.h index 6ee5bc1c0..8faaee3c2 100644 --- a/prboom2/src/d_event.h +++ b/prboom2/src/d_event.h @@ -48,8 +48,6 @@ typedef enum { ev_keydown, ev_keyup, - ev_mouseb_down, - ev_mouseb_up, ev_mouse, ev_mousemotion, ev_joystick, diff --git a/prboom2/src/d_main.c b/prboom2/src/d_main.c index 41ff1b570..d85474c40 100644 --- a/prboom2/src/d_main.c +++ b/prboom2/src/d_main.c @@ -209,7 +209,7 @@ void D_PostEvent(event_t *ev) // use key is used for seeing the current frame if ( !dsda_InputActivated(dsda_input_use) && !dsda_InputActivated(dsda_input_demo_skip) && - (ev->type == ev_keydown || ev->type == ev_keyup || ev->type == ev_mouseb_down || ev->type == ev_mouseb_up) // is this condition important? + (ev->type == ev_keydown || ev->type == ev_keyup) // is this condition important? ) { return; diff --git a/prboom2/src/dsda/input.c b/prboom2/src/dsda/input.c index 63a81939c..7455292d9 100644 --- a/prboom2/src/dsda/input.c +++ b/prboom2/src/dsda/input.c @@ -90,12 +90,6 @@ void dsda_InputTrackEvent(event_t* ev) { case ev_keyup: dsda_InputTrackKeyUp(ev); break; - case ev_mouseb_down: - dsda_InputTrackKeyDown(ev); - break; - case ev_mouseb_up: - dsda_InputTrackKeyUp(ev); - break; case ev_mouse: dsda_InputTrackButtons(mousebuttons, MAX_MOUSE_BUTTONS, ev); break; @@ -148,12 +142,6 @@ void dsda_InputTrackGameEvent(event_t* ev) { case ev_keyup: dsda_InputTrackGameKeyUp(ev); break; - case ev_mouseb_down: - dsda_InputTrackGameKeyDown(ev); - break; - case ev_mouseb_up: - dsda_InputTrackGameKeyUp(ev); - break; case ev_mouse: dsda_InputTrackGameButtons(mousebuttons, MAX_MOUSE_BUTTONS, ev); break; diff --git a/prboom2/src/f_finale.c b/prboom2/src/f_finale.c index 631c12743..651e84868 100644 --- a/prboom2/src/f_finale.c +++ b/prboom2/src/f_finale.c @@ -617,7 +617,7 @@ void F_CastTicker (void) dboolean F_CastResponder (event_t* ev) { - if (ev->type != ev_keydown && ev->type != ev_mouseb_down) + if (ev->type != ev_keydown) return false; if (castdeath) diff --git a/prboom2/src/g_game.c b/prboom2/src/g_game.c index 1323ebe2b..d21f6ff4a 100644 --- a/prboom2/src/g_game.c +++ b/prboom2/src/g_game.c @@ -1380,12 +1380,6 @@ dboolean G_Responder (event_t* ev) case ev_keydown: return true; // eat key down events - case ev_mouseb_up: - return true; - - case ev_mouseb_down: - return true; - case ev_mousemotion: { double value; diff --git a/prboom2/src/heretic/f_finale.c b/prboom2/src/heretic/f_finale.c index d3a3e10aa..dabba154f 100644 --- a/prboom2/src/heretic/f_finale.c +++ b/prboom2/src/heretic/f_finale.c @@ -90,7 +90,7 @@ dboolean F_BlockingInput(void) dboolean Heretic_F_Responder(event_t * event) { - if (event->type != ev_keydown && event->type != ev_mouseb_down) + if (event->type != ev_keydown) { return false; } diff --git a/prboom2/src/i_video.h b/prboom2/src/i_video.h index 8fb900137..2cacf3d34 100644 --- a/prboom2/src/i_video.h +++ b/prboom2/src/i_video.h @@ -65,7 +65,6 @@ void I_SetPalette(int pal); /* CPhipps - pass down palette number */ void I_QueueFrameCapture(void); void I_QueueScreenshot(void); void I_HandleCapture(void); -void I_DelayEvent(void); void I_FinishUpdate (void); diff --git a/prboom2/src/m_menu.c b/prboom2/src/m_menu.c index 3805a9600..95b87eb10 100644 --- a/prboom2/src/m_menu.c +++ b/prboom2/src/m_menu.c @@ -5624,14 +5624,14 @@ int M_EventToCharacter(event_t* ev) } } } - else if (ev->type == ev_keydown || ev->type == ev_mouseb_down) + else if (ev->type == ev_keydown) { if (ev->data1.i == KEYD_RSHIFT) // phares 4/11/98 shiftdown = true; return ev->data1.i; } - else if (ev->type == ev_keyup || ev->type == ev_mouseb_up) + else if (ev->type == ev_keyup) { if (ev->data1.i == KEYD_RSHIFT) // phares 4/11/98 shiftdown = false;