Linux touchscreen inactive when game launches
We are creating a game that does not use a mouse or keyboard, only a touchscreen. We are using Ubuntu 16.04 for the OS. I found that after cross-compiling our game on Linux and running, there was no Linux touchscreen support. So we added code to LinuxApplication.cpp using the SDL_Event library documentation and the existing mouse events that works for simple touch and swipe/drag events.
The only issue that we have now is that if we turn on the computer and boot up then launch the game without first using the touchscreen, we get no input. Once the touchscreen is "touched" just once, we can launch the game without any issue and it works fine. If we fail to touch the screen before we launch the game, however, we must quit the game and relaunch. We need to be able to launch the game after startup, so we must have the touchscreen work without first having to touch the screen.
I am looking at all options, from scripting a fake touch (not sure if this is possible) before scripting the game launch after startup of the computer, to perhaps modifying more of the engine code or possibly some of the Linux OS code. I was hoping that a post here would ilicit some good ideas or suggestions.
asked Oct 27 '16 at 06:52 PM in Linux
I would suggest first understanding why the issue happens and trying to fix it properly before attempting a workaround. Try figuring out if this is a SDL issue or UE4 issue, then try narrowing it down - if the bug can be reproduced in a standalone "hello touch" it would be easier to test (or, in case it is a UE4 issue, use a more lightweight SlateViewer). Once the issue is understood it'll be easier to suggest a fix (or workaround, if fixing is too hard).
answered Oct 28 '16 at 02:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here