Changeset 75403 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Nov 12, 2018 5:50:58 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 126545
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp
r71196 r75403 40 40 41 41 /*Returns the windows version we're running on*/ 42 vboxWinVersion_t VBoxQueryWinVersion() 43 { 44 ULONG major, minor, build; 42 vboxWinVersion_t VBoxQueryWinVersion(uint32_t *pbuild) 43 { 44 ULONG major, minor; 45 static ULONG build = 0; 45 46 BOOLEAN checkedBuild; 46 47 static vboxWinVersion_t s_WinVersion = WINVERSION_UNKNOWN; 47 48 48 49 if (s_WinVersion != WINVERSION_UNKNOWN) 50 { 51 if (pbuild) 52 *pbuild = build; 53 49 54 return s_WinVersion; 55 } 50 56 51 57 checkedBuild = PsGetVersion(&major, &minor, &build, NULL); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.h
r69500 r75403 68 68 69 69 RT_C_DECLS_BEGIN 70 vboxWinVersion_t VBoxQueryWinVersion( void);70 vboxWinVersion_t VBoxQueryWinVersion(uint32_t *pbuild); 71 71 uint32_t VBoxGetHeightReduction(void); 72 72 bool VBoxLikesVideoMode(uint32_t display, uint32_t width, uint32_t height, uint32_t bpp); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPVidModes.cpp
r71196 r75403 356 356 * if the framebuffer window requires scrolling to fit the guest resolution. 357 357 * So add 1024x768 resolution for win8 guest to allow user switch to it */ 358 ( (VBoxQueryWinVersion( ) != WIN8 && VBoxQueryWinVersion() != WIN81)358 ( (VBoxQueryWinVersion(NULL) != WIN8 && VBoxQueryWinVersion(NULL) != WIN81) 359 359 || resolutionMatrix[resIndex].xRes != 1024 360 360 || resolutionMatrix[resIndex].yRes != 768) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r73097 r75403 621 621 return STATUS_UNSUCCESSFUL; 622 622 623 vboxWinVersion_t ver = VBoxQueryWinVersion(); 623 uint32_t build; 624 vboxWinVersion_t ver = VBoxQueryWinVersion(&build); 624 625 if (ver == WINVERSION_VISTA) 625 626 { 626 627 pKeyPrefix = VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_VISTA; 627 628 cbKeyPrefix = sizeof (VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_VISTA); 629 } 630 else if (ver >= WINVERSION_10 && build >= 17763) 631 { 632 pKeyPrefix = VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN10_17763; 633 cbKeyPrefix = sizeof (VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN10_17763); 628 634 } 629 635 else -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r74671 r75403 52 52 PVOID vboxWddmMemAlloc(IN SIZE_T cbSize) 53 53 { 54 POOL_TYPE enmPoolType = (VBoxQueryWinVersion( ) >= WINVERSION_8) ? NonPagedPoolNx : NonPagedPool;54 POOL_TYPE enmPoolType = (VBoxQueryWinVersion(NULL) >= WINVERSION_8) ? NonPagedPoolNx : NonPagedPool; 55 55 return ExAllocatePoolWithTag(enmPoolType, cbSize, VBOXWDDM_MEMTAG); 56 56 } … … 1290 1290 Status = STATUS_SUCCESS; 1291 1291 1292 if (VBoxQueryWinVersion( ) >= WINVERSION_8)1292 if (VBoxQueryWinVersion(NULL) >= WINVERSION_8) 1293 1293 { 1294 1294 DXGK_DISPLAY_INFORMATION DisplayInfo; … … 2260 2260 pCaps->GpuEngineTopology.NbAsymetricProcessingNodes = VBOXWDDM_NUM_NODES; 2261 2261 2262 if (VBoxQueryWinVersion( ) >= WINVERSION_8)2262 if (VBoxQueryWinVersion(NULL) >= WINVERSION_8) 2263 2263 pCaps->WDDMVersion = DXGKDDI_WDDMv1; 2264 2264 } … … 7505 7505 7506 7506 // Fill in the DriverInitializationData structure and call DxgkInitialize() 7507 if (VBoxQueryWinVersion( ) >= WINVERSION_8)7507 if (VBoxQueryWinVersion(NULL) >= WINVERSION_8) 7508 7508 DriverInitializationData.Version = DXGKDDI_INTERFACE_VERSION_WIN8; 7509 7509 else … … 7610 7610 7611 7611 LOGREL(("VBox WDDM Driver for Windows %s version %d.%d.%dr%d, %d bit; Built %s %s", 7612 VBoxQueryWinVersion( ) >= WINVERSION_8 ? "8+" : "Vista and 7",7612 VBoxQueryWinVersion(NULL) >= WINVERSION_8 ? "8+" : "Vista and 7", 7613 7613 VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV, 7614 7614 (sizeof (void*) << 3), __DATE__, __TIME__)); … … 7709 7709 { 7710 7710 /* No 3D support by the host. */ 7711 if (VBoxQueryWinVersion( ) >= WINVERSION_8)7711 if (VBoxQueryWinVersion(NULL) >= WINVERSION_8) 7712 7712 { 7713 7713 /* Use display only driver for Win8+. */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.h
r73097 r75403 53 53 #define VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_VISTA L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Control\\VIDEO\\" 54 54 #define VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN7 L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\UnitedVideo\\CONTROL\\VIDEO\\" 55 #define VBOXWDDM_REG_DISPLAYSETTINGSKEY_PREFIX_WIN10_17763 L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\UnitedVideo\\CONTROL\\VIDEO\\" 55 56 56 57 #define VBOXWDDM_REG_DISPLAYSETTINGS_ATTACH_RELX L"Attach.RelativeX" -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp
r69500 r75403 114 114 VideoPortZeroMemory(tmpRanges, sizeof(tmpRanges)); 115 115 116 if (VBoxQueryWinVersion( ) == WINVERSION_NT4)116 if (VBoxQueryWinVersion(NULL) == WINVERSION_NT4) 117 117 { 118 118 /* NT crashes if either of 'vendorId, 'deviceId' or 'slot' parameters is NULL, … … 774 774 *to allow our driver to be loaded. 775 775 */ 776 switch (VBoxQueryWinVersion( ))776 switch (VBoxQueryWinVersion(NULL)) 777 777 { 778 778 case WINVERSION_NT4: -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPVideoPortAPI.cpp
r69500 r75403 97 97 VideoPortZeroMemory(pAPI, sizeof(VBOXVIDEOPORTPROCS)); 98 98 99 if (VBoxQueryWinVersion( ) <= WINVERSION_NT4)99 if (VBoxQueryWinVersion(NULL) <= WINVERSION_NT4) 100 100 { 101 101 /* VideoPortGetProcAddress is available for >= win2k */
Note:
See TracChangeset
for help on using the changeset viewer.