Ticket #8641: mh_inv_fix.patch

File mh_inv_fix.patch, 860 bytes (added by bluegr, 17 years ago)

Fixes the Enter key in MH inventory screens

  • keyboard.cpp

     
    9393        if (_gfx->keypress()) {
    9494                key = _gfx->getKey();
    9595
    96                 if ((getFeatures() & GF_MANHUNTER) && (key == KEY_ENTER) &&
    97                         (_game.inputMode == INPUT_NONE))
    98                         key = 0x20; // Set Enter key to Space in Manhunter when there's no text input
    99 
    10096                debugC(3, kDebugLevelInput, "key %02x pressed", key);
    10197        }
    10298
     
    111107        if (key == 0 || (key == KEY_ESCAPE && (getFeatures() & GF_ESC_MENU)) )
    112108                return false;
    113109
     110        if ((getFeatures() & GF_MANHUNTER) && (key == KEY_ENTER) &&
     111                (_game.inputMode == INPUT_NONE))
     112                key = 0x20; // Set Enter key to Space in Manhunter when there's no text input
     113
    114114        debugC(3, kDebugLevelInput, "key = %04x", key);
    115115
    116116        for (i = 0; i < MAX_DIRS; i++) {