InitMouse(#PB_Mouse_Locked)
InitMouse(#PB_Mouse_Locked)
When passed as a parameter, #PB_Mouse_Locked doesn't actually seem to do anything - still get the system pointer displayed.
Re: InitMouse(#PB_Mouse_Locked)
Juts tried with Chrome and FireFox, and it seems to work as expected. Note: you need to click once on the screen to enable mouse locking.
ps: please always post a small full working snippet showing the bug so it's easier to test.
Code: Select all
InitMouse(#PB_Mouse_Locked)
OpenScreen(800, 600, 32, "Test")
Procedure RenderFrame()
Static x, y
ClearScreen(RGB(0, 0, 0))
If ExamineMouse()
If MouseButton(#PB_MouseButton_Left)
Debug "Left button"
EndIf
If MouseButton(#PB_MouseButton_Right)
Debug "Right button"
EndIf
If MouseButton(#PB_MouseButton_Middle)
Debug "Middle button"
EndIf
WheelDelta = MouseWheel()
If WheelDelta
Debug "Mouse wheel: " + WheelDelta
EndIf
EndIf
FlipBuffers(); // continue the rendering
EndProcedure
BindEvent(#PB_Event_RenderFrame, @RenderFrame())
FlipBuffers();
Re: InitMouse(#PB_Mouse_Locked)
Yes, I think the lack of initial clicking was the cause of the problem...