VirtualBox

Changeset 11655 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Aug 26, 2008 12:01:22 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
35359
Message:

Modified IKeyboard::PutScancodes to use SafeArray

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r11419 r11655  
    47424742        case SDLK_F10: case SDLK_F11: case SDLK_F12:
    47434743        {
    4744             /* send Ctrl-Alt-Fx to guest */
    4745             static LONG keySequence[] = {
    4746                 0x1d, // Ctrl down
    4747                 0x38, // Alt down
    4748                 0x00, // Fx down (placeholder)
    4749                 0x00, // Fx up (placeholder)
    4750                 0xb8, // Alt up
    4751                 0x9d  // Ctrl up
    4752             };
    4753 
    4754             /* put in the right Fx key */
    4755             keySequence[2] = Keyevent2Keycode(pEv);
    4756             keySequence[3] = keySequence[2] + 0x80;
    4757 
    4758             gKeyboard->PutScancodes(keySequence, ELEMENTS(keySequence), NULL);
     4744            // /* send Ctrl-Alt-Fx to guest */
     4745            com::SafeArray<LONG> keys(6);
     4746           
     4747            keys[0] = 0x1d; // Ctrl down
     4748            keys[1] = 0x38; // Alt down
     4749            keys[2] = Keyevent2Keycode(pEv); // Fx down
     4750            keys[3] = keys[2] + 0x80; // Fx up
     4751            keys[4] = 0xb8; // Alt up
     4752            keys[5] = 0x9d;  // Ctrl up
     4753
     4754            gKeyboard->PutScancodes(ComSafeArrayAsInParam(keys), NULL);
    47594755            return VINF_SUCCESS;
    47604756        }
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