Changeset 24497 in vbox for trunk/src/VBox
- Timestamp:
- Nov 9, 2009 12:31:12 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 54586
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r24494 r24497 1247 1247 */ 1248 1248 Hardware::Hardware() 1249 : strVersion(" 2"),1249 : strVersion("1"), 1250 1250 fHardwareVirt(true), 1251 1251 fHardwareVirtExclusive(HWVIRTEXCLUSIVEDEFAULT), … … 1520 1520 Storage &strg) 1521 1521 { 1522 elmHardware.getAttributeValue("version", hw.strVersion); 1523 // defaults to 2 and is only written if != 2 1524 1522 if (!elmHardware.getAttributeValue("version", hw.strVersion)) 1523 { 1524 /* KLUDGE ALERT! For a while during the 3.1 development this was not 1525 written because it was thought to have a default value of "2". For 1526 sv <= 1.3 it defaults to "1" because the attribute didn't exist, 1527 while for 1.4+ it is sort of mandatory. Now, the buggy XML writer 1528 code only wrote 1.7 and later. So, if it's a 1.7+ XML file and it's 1529 missing the hardware version, then it probably should be "2" instead 1530 of "1". */ 1531 if (m->sv < SettingsVersion_v1_7) 1532 hw.strVersion = "1"; 1533 else 1534 hw.strVersion = "2"; 1535 } 1525 1536 Utf8Str strUUID; 1526 1537 if (elmHardware.getAttributeValue("uuid", strUUID)) … … 2424 2435 xml::ElementNode *pelmHardware = elmParent.createChild("Hardware"); 2425 2436 2426 if ( hw.strVersion != "2")2437 if (m->sv >= SettingsVersion_v1_4) 2427 2438 pelmHardware->setAttribute("version", hw.strVersion); 2428 2439 if ( (m->sv >= SettingsVersion_v1_9) … … 2952 2963 void MachineConfigFile::bumpSettingsVersionIfNeeded() 2953 2964 { 2965 // The hardware versions other than "1" requires settings version 1.4 (2.1+). 2966 if ( m->sv < SettingsVersion_v1_4 2967 && hardwareMachine.strVersion != "1") 2968 m->sv < SettingsVersion_v1_4; 2969 2954 2970 // "accelerate 2d video" requires settings version 1.8 2955 2971 if ( (m->sv < SettingsVersion_v1_8)
Note:
See TracChangeset
for help on using the changeset viewer.