update windows project to add poly2tri
This commit is contained in:
@@ -288,7 +288,7 @@ int main(int argc, char** argv)
|
||||
while (running)
|
||||
{
|
||||
// If there any message in the queue process it
|
||||
if (!App::I.redraw && PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
if (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
|
||||
{
|
||||
running = !(msg.message == WM_QUIT/* || gl.keys[VK_ESCAPE]*/);
|
||||
DispatchMessage(&msg);
|
||||
@@ -308,10 +308,10 @@ int main(int argc, char** argv)
|
||||
SwapBuffers(hDC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Sleep((DWORD)(1.0f / 60.0f * 1000.f));
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// Sleep((DWORD)(1.0f / 60.0f * 1000.f));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,11 +368,11 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
App::I.key_up(convert_key((int)wp));
|
||||
break;
|
||||
case WM_CHAR:
|
||||
App::I.key_char((int)wp);
|
||||
//App::I.key_char((int)wp);
|
||||
break;
|
||||
case WM_MOUSEMOVE:
|
||||
//TODO: find a way to check if event is mouse/stylus. For now use Mouse for all
|
||||
if (leftDown)
|
||||
if (0 && leftDown)
|
||||
{
|
||||
POINT pt = { GET_X_LPARAM(lp), GET_Y_LPARAM(lp) };
|
||||
// See discussion for why this code is wrong
|
||||
@@ -382,6 +382,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
int cmmpt = GetMouseMovePointsEx(sizeof(mmpt), &mmpt,
|
||||
rgmmpt, 64, GMMP_USE_DISPLAY_POINTS);
|
||||
|
||||
if (cmmpt == -1 || cmmpt == 64)
|
||||
{
|
||||
App::I.mouse_move((float)GET_X_LPARAM(lp), (float)GET_Y_LPARAM(lp), WacomTablet::I.get_pressure(), kEventSource::Mouse);
|
||||
lastPoint = pt;
|
||||
lastTime = GetMessageTime();
|
||||
break;
|
||||
}
|
||||
|
||||
POINT ptLastScreen = lastPoint;
|
||||
ClientToScreen(hWnd, &ptLastScreen);
|
||||
int i;
|
||||
@@ -389,6 +397,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp)
|
||||
{
|
||||
if (rgmmpt[i].x > 32767) rgmmpt[i].x -= 65536;
|
||||
if (rgmmpt[i].y > 32767) rgmmpt[i].y -= 65536;
|
||||
LOG("x %4d y %4d", rgmmpt[i].x, rgmmpt[i].y);
|
||||
|
||||
if (rgmmpt[i].time < lastTime) break;
|
||||
if (rgmmpt[i].time == lastTime &&
|
||||
|
||||
Reference in New Issue
Block a user