* win32 hotkeys: disallow unwanted hits of e.g. F1 after pressing Shift+F1 and quickly releasing Shift

* win32 hotkeys mapping: added the condition that both commands must have the same EMUCMDFLAG_TASEDITOR, or else they are not considered conflicting
This commit is contained in:
ansstuff 2012-11-10 17:16:01 +00:00
parent 25ded9a7a6
commit dbffd4eb7b
2 changed files with 4 additions and 2 deletions

View File

@ -75,7 +75,7 @@ void KeyboardUpdateState(void)
int notAlternateThrottle = !(soundoptions&SO_OLDUP) && soundo && ((NoWaiting&1)?(256*16):fps_scale) >= 64;
#define KEY_REPEAT_INITIAL_DELAY ((!notAlternateThrottle) ? (16) : (64)) // must be >= 0 and <= 255
#define KEY_REPEAT_REPEATING_DELAY (6) // must be >= 1 and <= 255
#define KEY_JUST_DOWN_DURATION (4) // must be >= 1 and <= 255
#define KEY_JUST_DOWN_DURATION (1) // must be >= 1 and <= 255 // AnS: changed to 1 to disallow unwanted hits of e.g. F1 after pressing Shift+F1 and quickly releasing Shift
for(int i = 0 ; i < 256 ; i++)
if(tk[i])

View File

@ -455,7 +455,9 @@ void PopulateConflictTable(int* conflictTable)
for(unsigned int j = i + 1; j < EMUCMD_MAX; ++j)
{
if(FCEUD_CommandMapping[i] &&
FCEUD_CommandMapping[i] == FCEUD_CommandMapping[j])
FCEUD_CommandMapping[i] == FCEUD_CommandMapping[j] &&
// AnS: added the condition that both commands must have the same EMUCMDFLAG_TASEDITOR, or else they are not considered conflicting
(FCEUI_CommandTable[i].flags & EMUCMDFLAG_TASEDITOR) == (FCEUI_CommandTable[j].flags & EMUCMDFLAG_TASEDITOR))
{
conflictTable[i] = 1;
conflictTable[j] = 1;