Changeset 7464 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Mar 14, 2008 5:05:33 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28903
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibVideo.cpp
r7428 r7464 23 23 #include <iprt/mem.h> 24 24 #include <iprt/assert.h> 25 #include <VBox/log.h> 25 26 26 27 #include "VBGLR3Internal.h" … … 201 202 return rc; 202 203 } 204 205 /** 206 * Query the host as to whether it likes a specific video mode. 207 * 208 * @returns the result of the query 209 * @param cx the width of the mode being queried 210 * @param cy the height of the mode being queried 211 * @param cBits the bpp of the mode being queried 212 */ 213 VBGLR3DECL(bool) VbglR3HostLikesVideoMode(uint32_t cx, uint32_t cy, 214 uint32_t cBits) 215 { 216 bool brc = false; 217 int rc = VINF_SUCCESS; 218 VMMDevVideoModeSupportedRequest req; 219 220 vmmdevInitRequest(&req.header, VMMDevReq_VideoModeSupported); 221 req.width = cx; 222 req.height = cy; 223 req.bpp = cBits; 224 req.fSupported = false; 225 rc = vbglR3GRPerform(&req.header); 226 if (RT_SUCCESS(rc) && RT_SUCCESS(req.header.rc)) 227 brc = req.fSupported; 228 else 229 LogRelFunc(("error querying video mode supported status from VMMDev." 230 "rc = %Vrc, VMMDev rc = %Vrc\n", rc, req.header.rc)); 231 return brc; 232 } -
trunk/src/VBox/Additions/x11/xgraphics/vboxutils.c
r7443 r7464 882 882 return FALSE; 883 883 } 884 885 886 /** 887 * Query the host as to whether it likes a specific video mode. 888 * 889 * @returns the result of the query 890 * @param cx the width of the mode being queried 891 * @param cy the height of the mode being queried 892 * @param cBits the bpp of the mode being queried 893 */ 894 Bool 895 vboxHostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits) 896 { 897 return VbglR3HostLikesVideoMode(cx, cy, cBits); 898 } -
trunk/src/VBox/Additions/x11/xgraphics/vboxvideo.h
r7443 r7464 171 171 uint32_t *piDisplay, VBOXPtr pVBox); 172 172 173 extern Bool vboxHostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits); 174 173 175 #endif /* _VBOXVIDEO_H_ */ -
trunk/src/VBox/Additions/x11/xgraphics/vboxvideo_13.c
r7443 r7464 346 346 vbox_output_mode_valid (xf86OutputPtr output, DisplayModePtr mode) 347 347 { 348 (void) output; (void) mode; 349 return MODE_OK; 348 if (vboxHostLikesVideoMode(mode->HDisplay, mode->VDisplay, 349 output->scrn->bitsPerPixel)) 350 return MODE_OK; 351 else 352 return MODE_BAD; 350 353 } 351 354 … … 410 413 vbox_output_add_mode(&pModes, NULL, x, y, TRUE); 411 414 } 412 vbox_output_add_mode(&pModes, NULL, 1024, 768, FALSE);413 vbox_output_add_mode(&pModes, NULL, 800, 600, FALSE);414 vbox_output_add_mode(&pModes, NULL, 640, 480, FALSE);415 415 TRACE2; 416 416 return pModes; -
trunk/src/VBox/Additions/x11/xgraphics/vboxvideo_70.c
r7443 r7464 504 504 all invalid. */ 505 505 if (pcHostModeName != NULL) 506 { 506 507 pScrn->display->modes[i] = pcHostModeName; 507 else 508 --i; 509 pScrn->display->modes[i+1] = "1024x768"; 510 pScrn->display->modes[i+2] = "800x600"; 511 pScrn->display->modes[i+3] = "640x480"; 512 pScrn->display->modes[i+4] = NULL; 508 ++i; 509 } 510 if (vboxHostLikesVideoMode(1024, 768, pScrn->bitsPerPixel)) 511 { 512 pScrn->display->modes[i] = "1024x768"; 513 ++i; 514 } 515 if (vboxHostLikesVideoMode(800, 600, pScrn->bitsPerPixel)) 516 { 517 pScrn->display->modes[i] = "800x600"; 518 ++i; 519 } 520 /* A mode of last resort */ 521 pScrn->display->modes[i] = "640x480"; 522 ++i; 523 pScrn->display->modes[i] = NULL; 513 524 514 525 /* Create a builtin mode for every specified mode. This allows to specify arbitrary
Note:
See TracChangeset
for help on using the changeset viewer.