Advertisement

mouse driver for game (linux/windows)

Started by June 11, 2001 12:19 PM
3 comments, last by Spencer 23 years, 8 months ago
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
--Spencer"All in accordance with the prophecy..."
GLUT library has very simple mouse handler...
and it''s cross-platform...
No need to go down to low level stuff that you mentioned...
Advertisement
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.
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.
int 0x33 is dos interrupt
so it won''t work for linux

Arkon
[QSoft Systems]

This topic is closed to new replies.

Advertisement