Archived

This topic is now archived and is closed to further replies.

mouse driver for game (linux/windows)

This topic is 6030 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! i am currently developing a game which i hopefully can make compilable on both windows and linux machines. My problem now is to choose a way to handle the mouse input. If i was doing this for windows i could have used directinput but i am not doing that....So the way i see it i could use one of the following methods: 1. i can use the int 0x33(bios muse handler) to read the mouse input. But is this working in linux? 2. i can write my own interrupthandler for the mouse. This would be the coolest but is it working in windows? 3. Are there any libs for both linux and windows that handles the mouse? Any help would be highly appreciated --spencer

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''m not sure but I don''t think int 0x33 works in linux, except when you are in root mode. If you are in X then you can simply get mouse input from it.

Share this post


Link to post
Share on other sites
yes, use X11 or SDL (http://www.libsdl.org). Forget about low level things such as assembly, as this is highly unportable on linux (as linux can run on i386, M68K, MIPS64, Alpha, PPC, ARM, etc).

With SDL, you''ll get the added benefit of not needing too much code rewrite to port to windows, linux, beOS, *BSD, MacOS (I think MacOS is not official yet), etc.

Share this post


Link to post
Share on other sites