Changeset 8383 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Timestamp:
- Apr 25, 2008 11:23:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r8155 r8383 23 23 24 24 #include <VBox/VBoxGuest.h> 25 #include <VBox/VBoxDev.h> 25 26 #include <VBox/VBoxVideo.h> 26 27 … … 1830 1831 1831 1832 /** 1833 * VBoxVideoSetGraphicsCap 1834 * 1835 * Tells the host whether or not we currently support graphics in the 1836 * additions 1837 */ 1838 BOOLEAN FASTCALL VBoxVideoSetGraphicsCap(BOOLEAN isEnabled) 1839 { 1840 VMMDevReqGuestCapabilities2 *req = NULL; 1841 int rc; 1842 1843 rc = VbglGRAlloc ((VMMDevRequestHeader **)&req, 1844 sizeof (VMMDevReqGuestCapabilities2), 1845 VMMDevReq_SetGuestCapabilities); 1846 1847 if (!RT_SUCCESS(rc)) 1848 dprintf(("VBoxVideoSetGraphicsCap: failed to allocate a request, rc=%Rrc\n", rc)); 1849 else 1850 { 1851 req->u32OrMask = isEnabled ? VMMDEV_GUEST_SUPPORTS_GRAPHICS : 0; 1852 req->u32NotMask = isEnabled ? 0 : VMMDEV_GUEST_SUPPORTS_GRAPHICS; 1853 1854 rc = VbglGRPerform (&req->header); 1855 if (!RT_SUCCESS(rc) || !RT_SUCCESS(req->header.rc)) 1856 dprintf(("VBoxVideoSetGraphicsCap: request failed, rc = %Rrc, VMMDev rc = %Rrc\n", rc, req->header.rc)); 1857 if (RT_SUCCESS(rc)) 1858 rc = req->header.rc; 1859 } 1860 if (req != NULL) 1861 VbglGRFree (&req->header); 1862 return RT_SUCCESS(rc); 1863 } 1864 1865 /** 1832 1866 * VBoxVideoSetCurrentMode 1833 1867 * … … 1865 1899 /** @todo read from the port to see if the mode switch was successful */ 1866 1900 1901 /* Tell the host that we now support graphics in the additions */ 1902 VBoxVideoSetGraphicsCap(TRUE); 1867 1903 return TRUE; 1868 1904 } … … 1897 1933 #endif 1898 1934 1899 return TRUE; 1935 /* Tell the host that we no longer support graphics in the additions */ 1936 VBoxVideoSetGraphicsCap(FALSE); 1937 return TRUE; 1900 1938 } 1901 1939
Note:
See TracChangeset
for help on using the changeset viewer.