- Timestamp:
- Mar 8, 2010 12:05:02 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MouseImpl.cpp
r27159 r27160 286 286 287 287 if (RT_FAILURE(vrc)) 288 setError(VBOX_E_IPRT_ERROR, 289 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 290 vrc); 291 AssertRCReturn(vrc, VBOX_E_IPRT_ERROR); 288 return setError(VBOX_E_IPRT_ERROR, 289 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 290 vrc); 292 291 } 293 292 return S_OK; … … 318 317 dw, fButtons); 319 318 if (RT_FAILURE(vrc)) 320 setError(VBOX_E_IPRT_ERROR, 321 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 322 vrc); 323 AssertRCReturn(vrc, VBOX_E_IPRT_ERROR); 319 return setError(VBOX_E_IPRT_ERROR, 320 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 321 vrc); 324 322 } 325 323 return S_OK; … … 344 342 mouseXAbs, mouseYAbs); 345 343 if (RT_FAILURE(vrc)) 346 setError(VBOX_E_IPRT_ERROR, 347 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 348 vrc); 349 AssertRCReturn(vrc, VBOX_E_IPRT_ERROR); 344 return setError(VBOX_E_IPRT_ERROR, 345 tr("Could not send the mouse event to the virtual mouse (%Rrc)"), 346 vrc); 350 347 } 351 348 return S_OK; … … 403 400 404 401 ULONG displayWidth; 405 intrc = pDisplay->COMGETTER(Width)(&displayWidth);406 ComAssertComRCRet(rc, rc);402 HRESULT rc = pDisplay->COMGETTER(Width)(&displayWidth); 403 if (FAILED(rc)) return rc; 407 404 408 405 *pcX = displayWidth ? (x * 0xFFFF) / displayWidth: 0; … … 422 419 423 420 ULONG displayHeight; 424 intrc = pDisplay->COMGETTER(Height)(&displayHeight);425 ComAssertComRCRet(rc, rc);421 HRESULT rc = pDisplay->COMGETTER(Height)(&displayHeight); 422 if (FAILED(rc)) return rc; 426 423 427 424 *pcY = displayHeight ? (y * 0xFFFF) / displayHeight: 0; … … 453 450 uint32_t mouseXAbs; 454 451 HRESULT rc = convertDisplayWidth(x, &mouseXAbs); 455 ComAssertComRCRet(rc, rc); 452 if (FAILED(rc)) return rc; 453 456 454 /** 457 455 * @todo multi-monitor Windows guests expect this to be unbounded. … … 463 461 uint32_t mouseYAbs; 464 462 rc = convertDisplayHeight(y, &mouseYAbs); 465 ComAssertComRCRet(rc, rc);463 if (FAILED(rc)) return rc; 466 464 /* if (mouseYAbs > 0xffff) 467 465 mouseYAbs = mLastAbsY; */ … … 471 469 uint32_t mouseCaps; 472 470 rc = getVMMDevMouseCaps(&mouseCaps); 473 ComAssertComRCRet(rc, rc);471 if (FAILED(rc)) return rc; 474 472 475 473 /* … … 500 498 rc = reportRelEventToMouseDev(fNeedsJiggle ? 1 : 0, 0, dz, dw, 501 499 fButtons); 502 ComAssertComRCRet(rc, rc);503 500 } 504 501 } … … 506 503 rc = reportAbsEventToMouseDev(mouseXAbs, mouseYAbs, dz, dw, fButtons); 507 504 508 ComAssertComRCRet(rc, rc);505 if (FAILED(rc)) return rc; 509 506 510 507 mLastAbsX = mouseXAbs;
Note:
See TracChangeset
for help on using the changeset viewer.