VirtualBox

Changeset 49469 in vbox for trunk


Ignore:
Timestamp:
Nov 13, 2013 2:11:16 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
90600
Message:

DevPS2: Release keys after restoring saved state, not while loading it.

Location:
trunk/src/VBox/Devices/Input
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Input/DevPS2.cpp

    r48214 r49469  
    14251425
    14261426/**
     1427 * @callback_method_impl{FNSSMDEVLOADDONE, Key state fix-up after loading
     1428 */
     1429static DECLCALLBACK(int) kbdLoadDone(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)
     1430{
     1431    KBDState    *pThis = PDMINS_2_DATA(pDevIns, KBDState *);
     1432    int rc;
     1433
     1434    rc = PS2KLoadDone(&pThis->Kbd, pSSM);
     1435    return rc;
     1436}
     1437
     1438/**
    14271439 * Reset notification.
    14281440 *
     
    17081720            return rc;
    17091721    }
    1710     rc = PDMDevHlpSSMRegister(pDevIns, PCKBD_SAVED_STATE_VERSION, sizeof(*pThis), kbdSaveExec, kbdLoadExec);
     1722    rc = PDMDevHlpSSMRegisterEx(pDevIns, PCKBD_SAVED_STATE_VERSION, sizeof(*pThis), NULL,
     1723                                NULL, NULL, NULL,
     1724                                NULL, kbdSaveExec, NULL,
     1725                                NULL, kbdLoadExec, kbdLoadDone);
    17111726    if (RT_FAILURE(rc))
    17121727        return rc;
  • trunk/src/VBox/Devices/Input/PS2Dev.h

    r48214 r49469  
    5151void PS2KSaveState(PPS2K pThis, PSSMHANDLE pSSM);
    5252int  PS2KLoadState(PPS2K pThis, PSSMHANDLE pSSM, uint32_t uVersion);
     53int  PS2KLoadDone(PPS2K pThis, PSSMHANDLE pSSM);
    5354
    5455PS2K *KBDGetPS2KFromDevIns(PPDMDEVINS pDevIns);
  • trunk/src/VBox/Devices/Input/PS2K.cpp

    r49384 r49469  
    14341434            pThis->abDepressedKeys[u8] = 1;
    14351435        }
    1436         ps2kReleaseKeys(pThis);
    14371436    }
    14381437
     
    14481447
    14491448    return rc;
     1449}
     1450
     1451int PS2KLoadDone(PPS2K pThis, PSSMHANDLE pSSM)
     1452{
     1453    /* This *must* be done after the inital load because it may trigger
     1454     * interrupts and change the interrupt controller state.
     1455     */
     1456    ps2kReleaseKeys(pThis);
     1457    return VINF_SUCCESS;
    14501458}
    14511459
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette