commit dd8334f0a761f98cf6d35f4a1f1f9781f622f5ff
parent 82526cc322aa0596d5d232a90f68eb8f9b135fea
Author: amin <dev@aminmesbah.com>
Date: Wed, 20 Nov 2019 05:53:41 +0000
Add comment about GLFW input bug and its effects
The culmination of multiple hours of debuggig my software and hardware
and questioning my sanity.
FossilOrigin-Name: 72b1ecf30a3c4896cc22746b0675dd7bea7ac7e81150dc999a9f90f6aba46f16
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/platform_linux.c b/src/platform_linux.c
@@ -130,6 +130,22 @@ int main(void)
// TODO: Do something sane when vsync is disabled
glfwSwapBuffers(window);
+
+ // ಠ_ಠ: We are affected here by a GLFW bug [1]. On my Thinkpad X220, if
+ // I use the built-in keyboard, simultaneous key events sometimes get
+ // dropped. This causes, for example, a press of the jump key to often
+ // not be registered when the left or right arrow key is pressed
+ // simultaneously.
+ //
+ // If I plug in my beloved Leopold FC750R, the problem does not
+ // manifest.
+ //
+ // I have reproduced this behavior using glfw/tests/events.c
+ //
+ // TODO: Ditch GLFW on Linux, hope this gets fixed soon, or build it
+ // from source and apply the workaround discussed in [1].
+ //
+ // [1] https://github.com/glfw/glfw/issues/1112
glfwPollEvents();
}