VirtualBox

Changeset 8420 in vbox for trunk/src


Ignore:
Timestamp:
Apr 28, 2008 1:18:31 PM (17 years ago)
Author:
vboxsync
Message:

Save current video mode parameters before rebuilding the video mode table (Windows guest).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp

    r8393 r8420  
    201201    size_t matrixIndex;
    202202    VP_STATUS status = 0;
     203
     204    ULONG CurrentModeWidth = 0;
     205    ULONG CurrentModeHeight = 0;
     206    ULONG CurrentModeBPP = 0;
     207   
     208    if (DeviceExtension->CurrentMode != 0)
     209    {
     210        /* Save current video mode parameters because VideoModes array will be now rebuilt from scratch. */
     211        CurrentModeWidth  = VideoModes[DeviceExtension->CurrentMode - 1].VisScreenWidth;
     212        CurrentModeHeight = VideoModes[DeviceExtension->CurrentMode - 1].VisScreenHeight;
     213        CurrentModeBPP    = VideoModes[DeviceExtension->CurrentMode - 1].BitsPerPlane;
     214    }
    203215
    204216    /*
     
    569581        {
    570582            if (!xres)
    571                 xres = VideoModes[DeviceExtension->CurrentMode - 1].VisScreenWidth;
     583                xres = CurrentModeWidth;
    572584            if (!yres)
    573                 yres = VideoModes[DeviceExtension->CurrentMode - 1].VisScreenHeight;
     585                yres = CurrentModeHeight;
    574586            if (!bpp)
    575587            {
    576                 bpp  = VideoModes[DeviceExtension->CurrentMode - 1].BitsPerPlane;
     588                bpp  = CurrentModeBPP;
    577589#ifdef DEBUG_frank
    578590                {
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