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

Function FixPoints

bwapi/BWAPI/Source/WMode.cpp:99–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99LPARAM FixPoints(LPARAM lParam)
100{
101 POINTS pt = MAKEPOINTS(lParam);
102
103 if ( isCorrectVersion )
104 {
105 RECT clientRct;
106 GetClientRect(ghMainWnd, &clientRct);
107
108 if ( clientRct.right != BW::BWDATA::GameScreenBuffer.width() )
109 pt.x = (SHORT)((float)pt.x * ((float)BW::BWDATA::GameScreenBuffer.width() / (float)clientRct.right));
110 if ( clientRct.bottom != BW::BWDATA::GameScreenBuffer.height() )
111 pt.y = (SHORT)((float)pt.y * ((float)BW::BWDATA::GameScreenBuffer.height() / (float)clientRct.bottom));
112 }
113 return MAKELPARAM(pt.x, pt.y);
114}
115
116bool SendHotkey(BW::dlgEvent *pEvent)
117{

Callers 2

WindowProcFunction · 0.85
_GetCursorPosFunction · 0.85

Calls 2

widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected