We found out that we have to read the mouse before the keyboard, otherwise mouse cannot be read at all.
Annoying but okay, at least we found it.
Now we found out that its only working in windowed mode. When we start the game in fullscreen mode mouse can still not be read.
We do nothing else than examinekeyboard and examinemouse.
So whats wrong with purebasic under linux that we cannot access the mouse?
Reading mouse not working?
Re: Reading mouse not working?
You need to get the order right
ExamineMouse()
ExamineKeyboard()
otherwise it ends up eating the mouse events
ExamineMouse()
ExamineKeyboard()
otherwise it ends up eating the mouse events
Windows 11, Manjaro, Raspberry Pi OS


Re: Reading mouse not working?
Thats what we did. But its still working only in Windowed mode.
When I start in Fullscreen Mode Mouse cannot be accessed still.
When I start in Fullscreen Mode Mouse cannot be accessed still.
Re: Reading mouse not working?
maybe you'll have to do a windowed screen without a boarder and set the stretch mode
Windows 11, Manjaro, Raspberry Pi OS


Re: Reading mouse not working?
Thanks, that did the trick 
Here is the code for anyone who is interested:
[EDIT]: just fixed the above with simpler code
Here is the code for anyone who is interested:
Code: Select all
;Open video Screen
If win_mode
screenID = OpenWindow(0, 0, 0, 640, 480, "Lost Labyrinth", #PB_Window_Maximize|#PB_Window_ScreenCentered|#PB_Screen_SmartSynchronization|#PB_Window_BorderLess)
screenopen = 1
Else
;Windowed mode
screenID = OpenWindow(0, 0, 0, 640, 480, "Lost Labyrinth",#PB_Window_SizeGadget|#PB_Window_MaximizeGadget|#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered|#PB_Screen_SmartSynchronization)
screenopen = 2
windowsfenster = #True
EndIf
If Not screenID Or Not OpenWindowedScreen(screenID, 0, 0, 640, 480, #True, 0, 0)
PrintN("Screen could bot be opened!")
End
EndIf
Re: Reading mouse not working?
How would I do that?
I tried around a lot but its still not working.
I tried around a lot but its still not working.
Re: Reading mouse not working?
Ah yes true... the code above seems to work perfectly on Windows, but on Linux the window does not properly stretch to fullscreen (it stays 640x480 pixels in the middle of the screen while the rest around is simply white).
Autostretch problem on Linux?
Autostretch problem on Linux?


