VirtualBox

Changeset 69008 in vbox


Ignore:
Timestamp:
Oct 6, 2017 5:47:26 PM (7 years ago)
Author:
vboxsync
Message:

Main/Console: better EFI resolution config, in a single extradata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r68992 r69008  
    17801780            /* Get graphics resolution settings */
    17811781            uint32_t u32HorizontalResolution = 0;
    1782             GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiHorizontalResolution", &strTmp);
    1783             if (strTmp.isEmpty())
    1784                 GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiUgaHorizontalResolution", &strTmp);
     1782            uint32_t u32VerticalResolution = 0;
     1783            GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiResolution", &strTmp);
    17851784            if (!strTmp.isEmpty())
    1786                 u32HorizontalResolution = strTmp.toUInt32();
    1787 
    1788             uint32_t u32VerticalResolution = 0;
    1789             GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiVerticalResolution", &strTmp);
    1790             if (strTmp.isEmpty())
    1791                 GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiUgaVerticalResolution", &strTmp);
    1792             if (!strTmp.isEmpty())
    1793                 u32VerticalResolution = strTmp.toUInt32();
     1785            {
     1786                size_t pos = strTmp.find('x');
     1787                if (pos != strTmp.npos)
     1788                {
     1789                    Utf8Str strH, strV;
     1790                    strH.assignEx(strTmp, 0, pos);
     1791                    strV.assignEx(strTmp, pos+1, strTmp.length()-pos);
     1792                    u32HorizontalResolution = strH.toUInt32();
     1793                    u32VerticalResolution = strV.toUInt32();
     1794                }
     1795            }
     1796            else
     1797            {
     1798                GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiHorizontalResolution", &strTmp);
     1799                if (strTmp.isEmpty())
     1800                    GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiUgaHorizontalResolution", &strTmp);
     1801                if (!strTmp.isEmpty())
     1802                    u32HorizontalResolution = strTmp.toUInt32();
     1803
     1804                GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiVerticalResolution", &strTmp);
     1805                if (strTmp.isEmpty())
     1806                    GetExtraDataBoth(virtualBox, pMachine, "VBoxInternal2/EfiUgaVerticalResolution", &strTmp);
     1807                if (!strTmp.isEmpty())
     1808                    u32VerticalResolution = strTmp.toUInt32();
     1809            }
    17941810
    17951811            /*
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