Changeset 53530 in vbox for trunk/src/VBox/Additions/common/VBoxVideo
- Timestamp:
- Dec 12, 2014 8:44:49 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97271
- Location:
- trunk/src/VBox/Additions/common/VBoxVideo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
r50900 r53530 235 235 rc = VERR_NO_MEMORY; 236 236 return rc; 237 } 238 239 240 /** 241 * Notify the host of HGSMI-related guest capabilities via an HGSMI command. 242 * @returns IPRT status value. 243 * @returns VERR_NOT_IMPLEMENTED if the host does not support the command. 244 * @returns VERR_NO_MEMORY if a heap allocation fails. 245 * @param pCtx the context of the guest heap to use. 246 * @param fCaps the capabilities to report, see VBVACAPS. 247 */ 248 RTDECL(int) VBoxHGSMISendCapsInfo(PHGSMIGUESTCOMMANDCONTEXT pCtx, 249 uint32_t fCaps) 250 { 251 return vboxHGSMISendCapsInfo(pCtx, fCaps); 237 252 } 238 253 -
trunk/src/VBox/Additions/common/VBoxVideo/Modesetting.cpp
r38929 r53530 25 25 #include <iprt/asm.h> 26 26 #include <iprt/log.h> 27 28 #ifndef VBOX_GUESTR3XF86MOD 29 # include <string.h> 30 #endif 27 31 28 32 /** … … 275 279 } 276 280 } 281 282 /** 283 * Get most recent video mode hints. 284 * @param pCtx the context containing the heap to use 285 * @param cScreens the number of screens to query hints for, starting at 0. 286 * @param pHints array of VBVAMODEHINT structures for receiving the hints. 287 * @returns iprt status code 288 * @returns VERR_NO_MEMORY HGSMI heap allocation failed. 289 * @returns VERR_NOT_SUPPORTED Host does not support this command. 290 */ 291 RTDECL(int) VBoxHGSMIGetModeHints(PHGSMIGUESTCOMMANDCONTEXT pCtx, 292 unsigned cScreens, VBVAMODEHINT *paHints) 293 { 294 int rc; 295 AssertPtrReturn(paHints, VERR_INVALID_POINTER); 296 void *p = VBoxHGSMIBufferAlloc(pCtx, sizeof(VBVAQUERYMODEHINTS) 297 + cScreens * sizeof(VBVAMODEHINT), 298 HGSMI_CH_VBVA, VBVA_QUERY_MODE_HINTS); 299 if (!p) 300 { 301 LogFunc(("HGSMIHeapAlloc failed\n")); 302 return VERR_NO_MEMORY; 303 } 304 else 305 { 306 VBVAQUERYMODEHINTS *pQuery = (VBVAQUERYMODEHINTS *)p; 307 308 pQuery->cHintsQueried = cScreens; 309 pQuery->cbHintStructureGuest = sizeof(VBVAMODEHINT); 310 pQuery->rc = VERR_NOT_SUPPORTED; 311 312 VBoxHGSMIBufferSubmit(pCtx, p); 313 rc = pQuery->rc; 314 if (RT_SUCCESS(rc)) 315 memcpy(paHints, ((uint8_t *)p) + sizeof(VBVAQUERYMODEHINTS), 316 cScreens * sizeof(VBVAMODEHINT)); 317 318 VBoxHGSMIBufferFree(pCtx, p); 319 } 320 return rc; 321 }
Note:
See TracChangeset
for help on using the changeset viewer.