Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Raw input cross platform library

This thread is locked; no one can reply to it. rss feed Print
Raw input cross platform library
Chris Katko
Member #1,881
January 2002
avatar

I just found this.

Seems interesting. Cross-platform Raw input (multiple mouse and keyboards per machine). Very low dependencies.

https://github.com/jkuhlmann/gainput

I wish it was C, though.

I wonder how difficult it would be to make an Allegro 5 driver from it.

It's been a long time though, so I can't remember whether A5's input support is better or worse than just using it straight.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Chris Katko
Member #1,881
January 2002
avatar

Seems like it supports multiple mice...

http://gainput.johanneskuhlmann.de/api/classgainput_1_1InputDeviceMouse.html

What do you mean by cursors then? Hardware level sprites in Windows, or simply multiple mice?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

torhu
Member #2,727
September 2002
avatar

If this is actually worth something, it's a lost opportunity to not write it in C. The languages that can use a C++ library directly can probably be counted on one hand. But you can always write a C wrapper for C++ code, since C++ compiles support C declarations.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Multiple mice on Windows mean nothing if you don't control separate cursors for them. I spent an entire summer developing ManyMouse just for this purpose. Each mouse needs to have its own individual cursor (mini window), and it needs to be able to interact independently from the other mice. The RAW Input API from Microsoft supports this, but all input is lumped together into a single master mouse cursor if you use their high level mouse api. You've got to be able to send mouse input from the Hardware mouse directly to the window underneath it. I spent a long time on it, and there are still tons of problems interacting with windows due to z-order, and a whole giant mess of sub-components to windows (read Microsoft controls) that complicates things to no end.

anto80
Member #3,230
February 2003
avatar

It reminds me that Lemmings (at least on Amiga version) provided a 2 player mode with 2 mouses input management. :)

___________
Currently working on his action/puzzle game CIPHER PUSHER : Blocks/Vortexes/Seafood! Facebook - Twitter - webpage

Go to: