VirtualBox

Changeset 46141 in vbox for trunk/src


Ignore:
Timestamp:
May 17, 2013 12:24:05 PM (12 years ago)
Author:
vboxsync
Message:

UIMachineSettingsGeneral.cpp: Update the long mode guest CPU setting when the guest type is changed. We will not have a complicated checkbox setup in the GUI, but rather sync the two based on guest type _changes_.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r43459 r46141  
    192192        if (isMachineOffline())
    193193        {
    194             /* Basic tab: */
    195             m_machine.SetOSTypeId(generalData.m_strGuestOsTypeId);
     194            /* Basic tab: Must update long mode CPU feature bit when os type changes. */
     195            if (generalData.m_strGuestOsTypeId != m_cache.base().m_strGuestOsTypeId)
     196            {
     197                m_machine.SetOSTypeId(generalData.m_strGuestOsTypeId);
     198
     199                CVirtualBox vbox = vboxGlobal().virtualBox();
     200                CGuestOSType newType = vbox.GetGuestOSType(generalData.m_strGuestOsTypeId);
     201                m_machine.SetCPUProperty(KCPUPropertyType_LongMode, newType.GetIs64Bit());
     202            }
     203
    196204            /* Advanced tab: */
    197205            m_machine.SetSnapshotFolder(generalData.m_strSnapshotsFolder);
Note: See TracChangeset for help on using the changeset viewer.

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