Symbian^3 port

This commit is contained in:
Shinovon 2026-04-29 05:15:13 +05:00
parent 77cdaaf97e
commit 3eb71f2cc5
106 changed files with 2098 additions and 745 deletions

View file

@ -526,11 +526,16 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
state.WHEELUP = true;
}
}
#elif defined __SYMBIAN32__
// TODO
state.LMB = true;
#else
// It seems there is no way to get number of buttons on mouse, so assign all buttons if we have mouse.
double xpos = 1.0f, ypos;
#ifndef __SYMBIAN32__
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
#endif
if (xpos != 0.f) {
state.MMB = true;
state.RMB = true;
@ -585,11 +590,17 @@ void CPad::UpdateMouse()
NewMouseControllerState = PCTempMouseControllerState;
}
}
#else
#if defined __SYMBIAN32__
if ( IsForegroundApp() /*&& PSGLOBAL(cursorIsInWindow)*/ )
#else
if ( IsForegroundApp() && PSGLOBAL(cursorIsInWindow) )
#endif
{
double xpos = 1.0f, ypos;
#ifndef __SYMBIAN32__
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
#endif
if (xpos == 0.f)
return;
@ -608,12 +619,14 @@ void CPad::UpdateMouse()
PCTempMouseControllerState.x = (float)(signX * (xpos - PSGLOBAL(lastMousePos.x)));
PCTempMouseControllerState.y = (float)(signy * (ypos - PSGLOBAL(lastMousePos.y)));
#ifndef __SYMBIAN32__
PCTempMouseControllerState.LMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_LEFT);
PCTempMouseControllerState.RMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_RIGHT);
PCTempMouseControllerState.MMB = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_MIDDLE);
PCTempMouseControllerState.MXB1 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_4);
PCTempMouseControllerState.MXB2 = glfwGetMouseButton(PSGLOBAL(window), GLFW_MOUSE_BUTTON_5);
#endif
if (PSGLOBAL(mouseWheel) > 0)
PCTempMouseControllerState.WHEELUP = 1;
else if (PSGLOBAL(mouseWheel) < 0)