- Fixed: genStringEnter mode acted on key up events rather than key repeat

events.


SVN r1773 (trunk)
This commit is contained in:
Randy Heit 2009-08-29 02:19:46 +00:00
parent fe96cab254
commit 7a89872b63
2 changed files with 41 additions and 32 deletions

View File

@ -1,4 +1,8 @@
August 12, 2009 (Changes by Graf Zahl) August 28, 2009
- Fixed: genStringEnter mode acted on key up events rather than key repeat
events.
August 12, 2009 (Changes by Graf Zahl)
- Fixed: paletted texture composition with part translucent patches - Fixed: paletted texture composition with part translucent patches
did not work. did not work.
- Fixed: A_SorcOffense2 depended on args being bytes and overflowing. - Fixed: A_SorcOffense2 depended on args being bytes and overflowing.
@ -29,7 +33,8 @@ August 9, 2009 (Changes by Graf Zahl)
August 8, 2009 (Changes by Graf Zahl) August 8, 2009 (Changes by Graf Zahl)
- replaced all code that changed a sector's light level with a setter function. - replaced all code that changed a sector's light level with a setter function.
- Fixed: The FeatureFlags array in the CPUInfo struct was not mapped to the flags properly. - Fixed: The FeatureFlags array in the CPUInfo struct was not mapped to the
flags properly.
August 8, 2009 August 8, 2009
- Changed the return value of SetActivatorToTarget to match the description - Changed the return value of SetActivatorToTarget to match the description

View File

@ -2874,45 +2874,49 @@ bool M_Responder (event_t *ev)
} }
return true; return true;
} }
if (ev->subtype == EV_GUI_KeyDown || ev->subtype == EV_GUI_KeyUp) ch = ev->data1;
if ((ev->subtype == EV_GUI_KeyDown || ev->subtype == EV_GUI_KeyRepeat) &&
ch == '\b')
{ {
ch = ev->data1; if (saveCharIndex > 0)
if (genStringEnter)
{ {
switch (ch) saveCharIndex--;
{ savegamestring[saveCharIndex] = 0;
case '\b':
if (saveCharIndex > 0)
{
saveCharIndex--;
savegamestring[saveCharIndex] = 0;
}
break;
case GK_ESCAPE:
genStringEnter = 0;
genStringCancel (); // [RH] Function to call when escape is pressed
break;
case '\r':
if (savegamestring[0])
{
genStringEnter = 0;
if (messageToPrint)
M_ClearMenus ();
genStringEnd (SelSaveGame); // [RH] Function to call when enter is pressed
}
break;
}
return true;
} }
} }
else if (ev->subtype == EV_GUI_KeyDown)
{
if (ch == GK_ESCAPE)
{
genStringEnter = 0;
genStringCancel(); // [RH] Function to call when escape is pressed
}
else if (ch == '\r')
{
if (savegamestring[0])
{
genStringEnter = 0;
if (messageToPrint)
M_ClearMenus ();
genStringEnd (SelSaveGame); // [RH] Function to call when enter is pressed
}
}
}
if (ev->subtype == EV_GUI_KeyDown || ev->subtype == EV_GUI_KeyRepeat)
{
return true;
}
} }
if (ev->subtype != EV_GUI_KeyDown && ev->subtype != EV_GUI_KeyUp) if (ev->subtype != EV_GUI_KeyDown && ev->subtype != EV_GUI_KeyUp)
{ {
return false; return false;
} }
if (ev->subtype == EV_GUI_KeyRepeat)
{
// We do our own key repeat handling but still want to eat the
// OS's repeated keys.
return true;
}
ch = ev->data1; ch = ev->data1;
keyup = ev->subtype == EV_GUI_KeyUp; keyup = ev->subtype == EV_GUI_KeyUp;
if (messageToPrint && messageRoutine == NULL) if (messageToPrint && messageRoutine == NULL)