I just recently installed Urho3D on Raspberry Pi 3.
But the problem is that when I run each of the example games (./05_AnimatingScene for example), the games opens and I see the scene, but the keyboard keys don’t work, and I’m not able to move or do anything.
All I can do is Ctrl+C to quit, which sometimes doesn’t work either!!
Ctrl+C is a terminal command. If it sometimes does not work then likely something is wrong with your system. You should test on a fresh install and provide us information on build you are using. What flags you used to build it or if it was build from website, and what distribution is installed on PI. Maybe then someone with right combination can test this and verify if it is broken or not.
I have seen a few users reporting input problem in Urho3D 1.6. I am partly to blame for this. Ever since the SDL 2.0.4 update, I have not actually tested the build on an actual RPI board. My old RPI is now being used as a mini server and I didn’t want to mess with it at the time. Bought myself a brand new RPI 3 last month but I haven’t spent quality time with it yet.
I think this is what happened. In the past before SDL 2.0.4 our RPI port still relied on the X11 for the input. After SDL 2.0.4 update, our RPI port does not use xinput anymore, if I recall correctly. It is a side effect from using SDL’s own CMakeLists.txt which auto-configures its configuration file. At that time I thought it is as intended and didn’t investigate it further.
Not sure if this is related, however I’ve been experiencing some issues with the EventSystem on Mac specifically where the events do not work… sometimes. UI elements, and everything else will load up at the start of the program, however no events will fire. This is currently a hard issue for me to duplicate since I’ve only seen it happen on OSX, and it doesn’t happen all of the time, just sometimes. Almost like a thread is running in the background and hasn’t fully completed.
Edit: Most of my development is done on a Windows machine which doesn’t seem to have the issue.
I think I have already given enough pointer on how to troubleshoot the problem. If you still do not understand how to do it then may be you can try the older 1.5 release instead while waiting the devs to fix this issue.
Ok, so for Mac I discovered something interesting. When the keys aren’t immediately working I noticed that if I wait 10-30 sec the UI and keys will start being responsive. Not sure if this helps, and again, I’ve only seen this so far on Mac, not Windows.
The uglier solution is to add back X11 stack just in order to get the keyboard input. Note that this was what we have done in the past version. But I consider that to be a mistake. We should not depend on X11 if I understood the Release Notes from SDL correctly. Perhaps I have a wrong understanding though. The latter can be done by simply flipping a switch in the generated SDL_config.h (I think).
I am having a strange problem with this now. The text input works until either CTRL or ALT are pressed. Once either of these keys has been pressed text input no longer works and the game needs to be closed and opened again to regain text input. Any ideas what could be causing this? Not sure where to look