VirtualBox

Changeset 108782 in vbox for trunk/src


Ignore:
Timestamp:
Mar 28, 2025 12:38:25 PM (3 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168215
Message:

GA/VBoxWddm: Simplify if-else logic and remove f3DRequired variable in DriverEntry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r108641 r108782  
    52175217    ULONG major, minor, build;
    52185218    BOOLEAN fCheckedBuild = PsGetVersion(&major, &minor, &build, NULL); NOREF(fCheckedBuild);
    5219     BOOLEAN f3DRequired = FALSE;
    52205219
    52215220    LOGREL(("OsVersion(%d, %d, %d)", major, minor, build));
     
    52265225    if (RT_SUCCESS(rc))
    52275226    {
    5228         /* Check whether 3D is required by the guest. */
    5229         if (major > 6)
    5230         {
    5231             /* Windows 10 and newer. */
    5232             f3DRequired = TRUE;
    5233         }
    5234         else if (major == 6)
    5235         {
    5236             if (minor >= 2)
    5237             {
    5238                 /* Windows 8, 8.1 and 10 preview. */
    5239                 f3DRequired = TRUE;
    5240             }
    5241             else
    5242             {
    5243                 f3DRequired = FALSE;
    5244             }
    5245         }
    5246         else
    5247         {
    5248             WARN(("Unsupported OLDER win version, ignore and assume 3D is NOT required"));
    5249             f3DRequired = FALSE;
    5250         }
    5251 
    5252         LOG(("3D is %srequired!", f3DRequired? "": "NOT "));
    5253 
    52545227        /* Check whether 3D is provided by the host. */
    52555228        VBOXVIDEO_HWTYPE enmHwType = VBOXVIDEO_HWTYPE_VBOX;
     
    53275300                else
    53285301                {
    5329                     if (f3DRequired)
    5330                     {
    5331                         LOGREL(("3D is NOT supported by the host, but is required for the current guest version using this driver.."));
    5332                         Status = STATUS_UNSUCCESSFUL;
    5333                     }
    5334                     else
    5335                         LOGREL(("3D is NOT supported by the host, but is NOT required for the current guest version using this driver, continuing with Disabled 3D.."));
     5302                    LOGREL(("3D is NOT supported by the host, but it is NOT required for Windows Vista/7 guests, continue with disabled 3D."));
    53365303                }
    53375304            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette