The mouse now starts tracking only when state loading is complete
This commit is contained in:
parent
6daa9d8d25
commit
2fc9fa0c2d
@ -256,7 +256,7 @@ namespace nf {
|
|||||||
if (m_mouseY < 0)
|
if (m_mouseY < 0)
|
||||||
m_mouseY = 0;
|
m_mouseY = 0;
|
||||||
|
|
||||||
if (m_trackingMouse) {
|
if (m_trackingMouse && m_currentState->isRunning()) {
|
||||||
int middleX = m_currentConfig.width / 2;
|
int middleX = m_currentConfig.width / 2;
|
||||||
int middleY = m_currentConfig.height / 2;
|
int middleY = m_currentConfig.height / 2;
|
||||||
m_mouseDiffX += m_mouseX - middleX;
|
m_mouseDiffX += m_mouseX - middleX;
|
||||||
@ -381,7 +381,7 @@ namespace nf {
|
|||||||
case WM_SETCURSOR: {
|
case WM_SETCURSOR: {
|
||||||
if (LOWORD(lParam) != HTCLIENT)
|
if (LOWORD(lParam) != HTCLIENT)
|
||||||
break;
|
break;
|
||||||
if (app->m_trackingMouse && LOWORD(lParam) == HTCLIENT && GetFocus() == hWnd) {
|
if (app->m_trackingMouse && app->m_currentState->isRunning() && LOWORD(lParam) == HTCLIENT && GetFocus() == hWnd) {
|
||||||
SetCursor(NULL);
|
SetCursor(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user