Ticket #3495: t3495_fix_hotkey_combos_v1.patch

File t3495_fix_hotkey_combos_v1.patch, 1.2 KB (added by elexis, 9 years ago)
  • source/ps/Hotkey.cpp

    void LoadHotkeys()  
    125125            bool allNegated = true;
    126126
    127127            for (const SKey& k : hotkey.requires)
    128128                if (!k.negated)
    129129                    allNegated = false;
    130            
     130
    131131            if (allNegated)
    132132                g_HotkeyStatus[hotkey.name] = true;
    133133        }
    134134}
    135135
    InReaction HotkeyInputHandler(const SDL_  
    297297            continue;
    298298
    299299        // Check for no unpermitted keys
    300300        bool accept = true;
    301301        for (const SKey& k : hotkey.requires)
     302        {
    302303            accept = isNegated(k);
     304            if (!accept)
     305                break;
     306        }
    303307
    304308        if (accept && !(consoleCapture && hotkey.name != "console.toggle"))
    305309        {
    306310            // Check if this is an equally precise or more precise match
    307311            if (hotkey.requires.size() + 1 >= closestMapMatch)
    InReaction HotkeyInputHandler(const SDL_  
    339343            continue;
    340344
    341345        // Check for no unpermitted keys
    342346        bool accept = true;
    343347        for (const SKey& k : hotkey.requires)
     348        {
    344349            accept = isNegated(k);
     350            if (!accept)
     351                break;
     352        }
    345353
    346354        if (accept)
    347355        {
    348356            SDL_Event_ hotkeyNotification;
    349357            hotkeyNotification.ev.type = SDL_HOTKEYUP;