Changeset 6849 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 7, 2008 2:35:49 PM (17 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
r6842 r6849 119 119 * @param pcy Where to store the vertical pixel resolution (0 = do not change). 120 120 * @param pcBits Where to store the bits per pixel (0 = do not change). 121 * @param fEventAck Flag that the request is an acknowlegement for the 122 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST. 123 * Values: 124 * 0 - just querying, 125 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST - event acknowledged. 126 * @param iDisplay 0 for primary display, 1 for the first secondary, etc. 127 */ 128 VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, 129 uint32_t fEventAck, uint32_t iDisplay) 130 { 131 VMMDevDisplayChangeRequest2 Req; 132 vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2); 133 Req.xres = 0; 134 Req.yres = 0; 135 Req.bpp = 0; 136 Req.eventAck = fEventAck; 137 Req.display = iDisplay; 121 * @param iDisplay Where to store the display number the request was for - 0 for the 122 * primary display, 1 for the first secondary, etc. 123 */ 124 VBGLR3DECL(int) VbglR3GetLastDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, 125 uint32_t *piDisplay) 126 { 127 VMMDevDisplayChangeRequest2 Req = { { 0 } }; 128 129 #ifndef VBOX_VBGLR3_XFREE86 130 AssertPtrReturn(pcx, VERR_INVALID_PARAMETER); 131 AssertPtrReturn(pcy, VERR_INVALID_PARAMETER); 132 AssertPtrReturn(pcBits, VERR_INVALID_PARAMETER); 133 AssertPtrReturn(piDisplay, VERR_INVALID_PARAMETER); 134 #endif 135 vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2); 138 136 int rc = vbglR3GRPerform(&Req.header); 139 137 if (RT_SUCCESS(rc)) … … 144 142 *pcy = Req.yres; 145 143 *pcBits = Req.bpp; 144 *piDisplay = Req.display; 146 145 } 147 146 return rc; -
trunk/src/VBox/Additions/x11/xgraphics/vboxutils-new.c
r6588 r6849 823 823 * @param pcy Where to store the vertical pixel resolution (0 = do not change). 824 824 * @param pcBits Where to store the bits per pixel (0 = do not change). 825 * @param fEventAck Flag that the request is an acknowlegement for the 826 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST. 827 * Values: 828 * 0 - just querying, 829 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST - event acknowledged. 830 * @param iDisplay 0 for primary display, 1 for the first secondary, etc. 825 * @param iDisplay Where to store the display number the request was for - 0 for the 826 * primary display, 1 for the first secondary, etc. 831 827 */ 832 828 Bool 833 829 vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *pcx, uint32_t *pcy, 834 uint32_t *pcBits, uint32_t fEventAck, uint32_tiDisplay)835 { 836 int rc = VbglR3Get DisplayChangeRequest(pcx, pcy, pcBits, fEventAck,iDisplay);830 uint32_t *pcBits, uint32_t *piDisplay) 831 { 832 int rc = VbglR3GetLastDisplayChangeRequest(pcx, pcy, pcBits, piDisplay); 837 833 if (RT_SUCCESS(rc)) 838 834 return TRUE; -
trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c
r6587 r6849 960 960 * 961 961 * @returns iprt status value 962 * @retval xres horizontal pixel resolution (0 = do not change) 963 * @retval yres vertical pixel resolution (0 = do not change) 964 * @retval bpp bits per pixel (0 = do not change) 965 * @param eventAck Flag that the request is an acknowlegement for the 966 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST. 967 * Values: 968 * 0 - just querying, 969 * VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST - event acknowledged. 970 * @param display 0 for primary display, 1 for the first secondary, etc. 962 * @param xres where to store the horizontal pixel resolution requested 963 * (0 = do not change) 964 * @param yres where to store the vertical pixel resolution requested 965 * (0 = do not change) 966 * @param bpp where to store the bits per pixel requeste 967 * (0 = do not change) 968 * @param display Where to store the display number the request was for - 969 * 0 for the primary display, 1 for the first secondary, etc. 971 970 */ 972 971 Bool 973 972 vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *px, uint32_t *py, 974 uint32_t *pbpp, uint32_t eventAck, uint32_tdisplay)973 uint32_t *pbpp, uint32_t *display) 975 974 { 976 975 int rc, scrnIndex = pScrn->scrnIndex; 977 976 VBOXPtr pVBox = pScrn->driverPrivate; 978 977 979 VMMDevDisplayChangeRequest2 Req ;978 VMMDevDisplayChangeRequest2 Req = { { 0 } }; 980 979 vmmdevInitRequest(&Req.header, VMMDevReq_GetDisplayChangeRequest2); 981 Req.xres = 0;982 Req.yres = 0;983 Req.bpp = 0;984 Req.eventAck = eventAck;985 Req.display = display;986 980 rc = vbox_vmmcall(pScrn, pVBox, &Req.header); 987 981 if (RT_SUCCESS(rc)) … … 990 984 *py = Req.yres; 991 985 *pbpp = Req.bpp; 986 *display = Req.display; 992 987 return TRUE; 993 988 } -
trunk/src/VBox/Additions/x11/xgraphics/vboxvideo.h
r6642 r6849 191 191 extern Bool vboxDisableVbva(ScrnInfoPtr pScrn); 192 192 193 extern Bool vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *pcx, uint32_t *pcy, 194 uint32_t *pcBits, uint32_t fEventAck, uint32_t iDisplay); 193 extern Bool vboxGetDisplayChangeRequest(ScrnInfoPtr pScrn, uint32_t *pcx, 194 uint32_t *pcy, uint32_t *pcBits, 195 uint32_t *piDisplay); 195 196 196 197 #endif /* _VBOXVIDEO_H_ */ -
trunk/src/VBox/Additions/x11/xgraphics/vboxvideo_13.c
r6642 r6849 398 398 vbox_output_get_modes (xf86OutputPtr output) 399 399 { 400 uint32_t x, y, bpp ;400 uint32_t x, y, bpp, display; 401 401 bool rc; 402 402 DisplayModePtr pModes = NULL; … … 404 404 405 405 TRACE; 406 rc = vboxGetDisplayChangeRequest(pScrn, &x, &y, &bpp, 0, 0); 406 rc = vboxGetDisplayChangeRequest(pScrn, &x, &y, &bpp, &display); 407 /* @todo - check the display number once we support multiple displays. */ 407 408 if (rc && (0 != x) && (0 != y)) { 408 409 vbox_output_add_mode(&pModes, NULL, x, y, TRUE); 409 vbox_output_add_mode(&pModes, "1024x768", 1024, 768, FALSE); 410 vbox_output_add_mode(&pModes, "800x600", 800, 600, FALSE); 411 vbox_output_add_mode(&pModes, "640x480", 640, 480, FALSE); 412 } else { 413 vbox_output_add_mode(&pModes, "1024x768", 1024, 768, FALSE); 414 vbox_output_add_mode(&pModes, "800x600", 800, 600, FALSE); 415 vbox_output_add_mode(&pModes, "640x480", 640, 480, FALSE); 416 } 410 } 411 vbox_output_add_mode(&pModes, "1024x768", 1024, 768, FALSE); 412 vbox_output_add_mode(&pModes, "800x600", 800, 600, FALSE); 413 vbox_output_add_mode(&pModes, "640x480", 640, 480, FALSE); 417 414 TRACE2; 418 415 return pModes;
Note:
See TracChangeset
for help on using the changeset viewer.