AlexanderDzhoganov / ksp-advanced-flybywire

Controller mod for Kerbal Space Program
MIT License
22 stars 33 forks source link

KSP 1.4 Linux compatibility #64

Open soulsource opened 6 years ago

soulsource commented 6 years ago

Recent Unity versions use SDL for input handling on Linux. That means, in order not to break KSP's input system, we mustn't consume any input inside the mod. As far as I understand the code I changed, its main purpose is to repopulate the event queue of SDL (as the event that gets polled is not used anywhere). The same effect can be achieved by pumping the event queue without reading from it. That's what this pull request does.

This plugin is now interesting again, as KSP 1.4.1 has broken Joystick/Gamepad handling on Linux. It's currently impossible to assign input axis, but Advanced Fly-By-Wire just works. Also, Toolbar Continued has been updated to 1.4.1, so Advanced Fly-By-Wire is just this patch and a recompile away from working on the new KSP.