mirror of
https://gitlab.com/shinovon/re3-symbian.git
synced 2026-05-23 01:57:21 +03:00
Symbian^3 port
This commit is contained in:
parent
77cdaaf97e
commit
3eb71f2cc5
106 changed files with 2098 additions and 745 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue