Skip to content

Commit

Permalink
Fixed problem with key press duplication in curses-based console.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 4, 2007
1 parent c175f18 commit 853d4e7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 42 deletions.
37 changes: 0 additions & 37 deletions doomsday/engine/portable/src/dd_input.c
Expand Up @@ -955,8 +955,6 @@ void DD_ReadKeyboard(void)
ev.type = E_TOGGLE;
ev.toggle.state = ETOG_REPEAT;

//ev.obsolete.noclass = true; // Don't specify a class
//ev.obsolete.useclass = 0; // initialize with something
for(i = 0; i < MAX_DOWNKEYS; ++i)
{
repeater_t *rep = keyReps + i;
Expand Down Expand Up @@ -1118,8 +1116,6 @@ void DD_ReadMouse(timespan_t ticLength)
ev.axis.type = EAXIS_RELATIVE;
xpos = mouse.x;
ypos = mouse.y;
//ev.obsolete.noclass = true; // Don't specify a class
//ev.obsolete.useclass = 0; // initialize with something

if(mouseFilter > 0)
{
Expand Down Expand Up @@ -1218,12 +1214,6 @@ void DD_ReadJoystick(void)

I_GetJoystickState(&state);

// Check the buttons.
/*bstate = 0;
for(i = 0; i < IJOY_MAXBUTTONS; ++i)
if(state.buttons[i])
bstate |= 1 << i; // Set the bits.
*/
// Joystick buttons.
ev.device = IDEV_JOY1;
ev.type = E_TOGGLE;
Expand All @@ -1245,24 +1235,6 @@ void DD_ReadJoystick(void)
}
}
}

//ev.obsolete.noclass = true; // Don't specify a class
//ev.obsolete.useclass = 0; // initialize with something

// Check for button state changes.
/* i = oldJoyBState ^ bstate; // The change mask.
// Send the relevant events.
if((ev.obsolete.controlID = bstate & i))
{
ev.obsolete.data1 = EVS_DOWN;
DD_PostEvent(&ev);
}
if((ev.obsolete.controlID = oldJoyBState & i))
{
ev.obsolete.data1 = EVS_UP;
DD_PostEvent(&ev);
}
oldJoyBState = bstate;*/

if(state.numHats > 0)
{
Expand All @@ -1272,15 +1244,6 @@ void DD_ReadJoystick(void)
{
ev.type = E_ANGLE;
ev.angle.id = 0;
/*
if(oldPOV != IJOY_POV_CENTER)
{
// Send a notification that the existing POV angle is no
// longer active.
ev.obsolete.data1 = EVS_UP;
ev.obsolete.controlID = (int) (oldPOV / 45 + .5); // Round off correctly w/.5.
DD_PostEvent(&ev);
}*/

if(state.hatAngle[0] < 0)
{
Expand Down
2 changes: 0 additions & 2 deletions doomsday/engine/portable/src/ui_main.c
Expand Up @@ -224,8 +224,6 @@ void UI_End(void)
rel.type = E_TOGGLE;
rel.toggle.state = ETOG_UP;
rel.toggle.id = DDKEY_RSHIFT;
//rel.obsolete.noclass = true;
//rel.obsolete.useclass = 0;
DD_PostEvent(&rel);
}
}
Expand Down
4 changes: 1 addition & 3 deletions doomsday/engine/unix/src/sys_console.c
Expand Up @@ -191,13 +191,11 @@ void Sys_ConPostEvents(void)
ev.device = IDEV_KEYBOARD;
ev.type = E_TOGGLE;
ev.toggle.state = ETOG_DOWN;
//ev.obsolete.noclass = true;
//ev.obsolete.useclass = 0; // initialize with something
ev.toggle.id = Sys_ConTranslateKey(key);
DD_PostEvent(&ev);

// Release immediately.
ev.toggle.state = ETOG_DOWN;
ev.toggle.state = ETOG_UP;
DD_PostEvent(&ev);
}
}
Expand Down

0 comments on commit 853d4e7

Please sign in to comment.