MCPcopy Create free account
hub / github.com/bwapi/bwapi / _GetCursorPos

Function _GetCursorPos

bwapi/BWAPI/Source/WMode.cpp:463–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461}
462
463BOOL WINAPI _GetCursorPos(LPPOINT lpPoint)
464{
465 if ( !lpPoint )
466 return FALSE;
467
468 if ( !wmode )
469 {
470 if ( _GetCursorPosOld )
471 return _GetCursorPosOld(lpPoint);
472 return GetCursorPos(lpPoint);
473 }
474
475 if ( !gbHoldingAlt )
476 {
477 lpPoint->x = 320;
478 lpPoint->y = 240;
479 }
480 else
481 {
482 POINT tempPoint;
483 if ( _GetCursorPosOld )
484 _GetCursorPosOld(&tempPoint);
485 else
486 GetCursorPos(&tempPoint);
487 ScreenToClient(ghMainWnd, &tempPoint);
488
489 LPARAM lConvert = FixPoints(MAKELPARAM(tempPoint.x, tempPoint.y));
490 POINTS final = MAKEPOINTS(lConvert);
491 lpPoint->x = final.x;
492 lpPoint->y = final.y;
493 }
494 return TRUE;
495}
496
497BOOL WINAPI _SetCursorPos(int X, int Y)
498{

Callers

nothing calls this directly

Calls 1

FixPointsFunction · 0.85

Tested by

no test coverage detected