VirtualBox

Ignore:
Timestamp:
Sep 8, 2008 10:58:16 AM (16 years ago)
Author:
vboxsync
Message:

LogRel for video mode hints which require too much VRAM.

File:
1 edited

Legend:

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

    r8515 r12215  
    2222#include "Helper.h"
    2323
     24#include <iprt/log.h>
    2425#include <VBox/VBoxGuest.h>
    2526#include <VBox/VBoxDev.h>
     
    149150/* number of available video modes, set by VBoxBuildModesTable  */
    150151static uint32_t gNumVideoModes = 0;
     152
     153static uint32_t g_xresNoVRAM = 0, g_yresNoVRAM = 0, g_bppNoVRAM = 0;
    151154
    152155/**
     
    689692            }
    690693            else
     694            {
    691695                dprintf(("VBoxVideo: invalid parameters for special mode: (xres = %d, yres = %d, bpp = %d, vramSize = %d)\n",
    692696                         xres, yres, bpp, vramSize));
     697                if (xres * yres * (bpp / 8) >= vramSize
     698                    && (xres != g_xresNoVRAM || yres != g_yresNoVRAM || bpp != g_bppNoVRAM))
     699                {
     700                    LogRel(("VBoxVideo: not enough VRAM for video mode %dx%dx%dbpp. Available: %d bytes. Required: more than %d bytes.\n",
     701                            xres, yres, bpp, vramSize, xres * yres * (bpp / 8)));
     702                    g_xresNoVRAM = xres;
     703                    g_yresNoVRAM = yres;
     704                    g_bppNoVRAM = bpp;
     705                }
     706            }
    693707        }
    694708        else
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