Changeset 55193 in vbox for trunk/src/VBox
- Timestamp:
- Apr 10, 2015 8:15:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxVideo/HGSMIBase.cpp
r55191 r55193 466 466 467 467 468 /** Sanity test on first call. We do not worry about concurrency issues. */ 469 static int testQueryConf(PHGSMIGUESTCOMMANDCONTEXT pCtx) 470 { 471 static bool cOnce = false; 472 uint32_t ulValue = 0; 473 int rc; 474 475 if (cOnce) 476 return VINF_SUCCESS; 477 cOnce = true; 478 rc = VBoxQueryConfHGSMI(pCtx, UINT32_MAX, &ulValue); 479 if (RT_SUCCESS(rc) && ulValue == UINT32_MAX) 480 return VINF_SUCCESS; 481 cOnce = false; 482 if (RT_FAILURE(rc)) 483 return rc; 484 return VERR_INTERNAL_ERROR; 485 } 486 487 468 488 /** 469 489 * Query the host for an HGSMI configuration parameter via an HGSMI command. … … 481 501 LogFunc(("u32Index = %d\n", u32Index)); 482 502 503 rc = testQueryConf(pCtx); 504 if (RT_FAILURE(rc)) 505 return rc; 483 506 /* Allocate the IO buffer. */ 484 507 p = (VBVACONF32 *)VBoxHGSMIBufferAlloc(pCtx, … … 489 512 /* Prepare data to be sent to the host. */ 490 513 p->u32Index = u32Index; 491 p->u32Value = 0;514 p->u32Value = UINT32_MAX; 492 515 rc = VBoxHGSMIBufferSubmit(pCtx, p); 493 516 if (RT_SUCCESS(rc))
Note:
See TracChangeset
for help on using the changeset viewer.