~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Devices/Graphics/DevVGA.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5677
5677
                                          "CustomVideoMode13\0"
5678
5678
                                          "CustomVideoMode14\0"
5679
5679
                                          "CustomVideoMode15\0"
5680
 
                                          "CustomVideoMode16\0"))
 
5680
                                          "CustomVideoMode16\0"
 
5681
                                          "MaxBiosXRes\0"
 
5682
                                          "MaxBiosYRes\0"))
5681
5683
        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
5682
5684
                                N_("Invalid configuration for vga device"));
5683
5685
 
6055
6057
    AssertLogRelRCReturn(rc, rc);
6056
6058
 
6057
6059
#ifdef VBE_NEW_DYN_LIST
 
6060
 
 
6061
    uint16_t maxBiosXRes;
 
6062
    rc = CFGMR3QueryU16Def(pCfg, "MaxBiosXRes", &maxBiosXRes, UINT16_MAX);
 
6063
    AssertLogRelRCReturn(rc, rc);
 
6064
    uint16_t maxBiosYRes;
 
6065
    rc = CFGMR3QueryU16Def(pCfg, "MaxBiosYRes", &maxBiosYRes, UINT16_MAX);
 
6066
    AssertLogRelRCReturn(rc, rc);
 
6067
 
6058
6068
    /*
6059
6069
     * Compute buffer size for the VBE BIOS Extra Data.
6060
6070
     */
6102
6112
                * pixelWidth;
6103
6113
        if (reqSize >= pThis->vram_size)
6104
6114
            continue;
 
6115
        if (   mode_info_list[i].info.XResolution > maxBiosXRes
 
6116
            || mode_info_list[i].info.YResolution > maxBiosYRes)
 
6117
            continue;
6105
6118
        *pCurMode = mode_info_list[i];
6106
6119
        vgaAdjustModeInfo(pThis, pCurMode);
6107
6120
        pCurMode++;
6133
6146
            reqSize = pDefMode->info.XResolution * pDefMode->info.YResolution *  pixelWidth;
6134
6147
            if (reqSize >= pThis->vram_size)
6135
6148
                continue;
 
6149
            if (   pDefMode->info.XResolution > maxBiosXRes
 
6150
                || pDefMode->info.YResolution - cyReduction > maxBiosYRes)
 
6151
                continue;
6136
6152
            *pCurMode = *pDefMode;
6137
6153
            pCurMode->mode += 0x30;
6138
6154
            pCurMode->info.YResolution -= cyReduction;