VirtualBox

Changeset 32120 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
Aug 31, 2010 9:58:36 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
65395
Message:

Main, devices: support for chipset selection in the public API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r32063 r32120  
    15491549          pointingHidType(PointingHidType_PS2Mouse),
    15501550          keyboardHidType(KeyboardHidType_PS2Keyboard),
     1551          chipsetType(ChipsetType_PIIX3),
    15511552          clipboardMode(ClipboardMode_Bidirectional),
    15521553          ulMemoryBalloonSize(0),
     
    15961597                  && (fAccelerate3D             == h.fAccelerate3D)
    15971598                  && (fAccelerate2DVideo        == h.fAccelerate2DVideo)
    1598                   && (firmwareType              == h.firmwareType)
     1599                  && (firmwareType              == h.firmwareType)                     
    15991600                  && (pointingHidType           == h.pointingHidType)
    16001601                  && (keyboardHidType           == h.keyboardHidType)
     1602                  && (chipsetType               == h.chipsetType)
    16011603                  && (vrdpSettings              == h.vrdpSettings)
    16021604                  && (biosSettings              == h.biosSettings)
     
    23512353                                          N_("Invalid value '%s' in HID/Pointing/@type"),
    23522354                                          strHidType.c_str());
     2355            }
     2356        }
     2357        else if (pelmHwChild->nameEquals("Chipset"))
     2358        {
     2359            Utf8Str strChipsetType;
     2360            if (pelmHwChild->getAttributeValue("type", strChipsetType))
     2361            {
     2362                if (strChipsetType == "PIIX3")
     2363                    hw.chipsetType = ChipsetType_PIIX3;
     2364                else if (strChipsetType == "ICH9")
     2365                    hw.chipsetType = ChipsetType_ICH9;
     2366                else
     2367                    throw ConfigFileError(this,
     2368                                          pelmHwChild,
     2369                                          N_("Invalid value '%s' in Chipset/@type"),
     2370                                          strChipsetType.c_str());
    23532371            }
    23542372        }
     
    32823300    }
    32833301
     3302    if (    (m->sv >= SettingsVersion_v1_11)
     3303       )
     3304    {
     3305         xml::ElementNode *pelmChipset = pelmHardware->createChild("Chipset");
     3306         const char *pcszChipset;
     3307
     3308         switch (hw.chipsetType)
     3309         {
     3310            case ChipsetType_PIIX3:             pcszChipset = "PIIX3";   break;
     3311            case ChipsetType_ICH9:              pcszChipset = "ICH9";    break;
     3312            default:            Assert(false);  pcszChipset = "PIIX3";   break;
     3313         }
     3314         pelmChipset->setAttribute("Type", pcszChipset);
     3315    }
     3316
    32843317    xml::ElementNode *pelmBoot = pelmHardware->createChild("Boot");
    32853318    for (BootOrderMap::const_iterator it = hw.mapBootOrder.begin();
     
    44184451    }
    44194452}
    4420 
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