Using two mouse for input

Hello

Is there any way to use 2 mouse as input in an independent way with SDL?
I can choose wich joystick to use as input, and i think use 2 as input in an independant way.
I need to use 2 mouse as input, but i can only access the mouse that is using X.
Can i have access to another mouse? I have search SDL_mouse.h and i see no function to
access another mouse.

Thanks—
Alejandro Arrieta Rios
CS Student UTFSM
Chile

Hi -

I built an SDL.lib for the free borland compiler - the one that is in the
actual SDL delivery (http://www.libsdl.org/release/SDL-1.2.7.zip) is from
SDL 1.2.4 so there are things that have changed since then.

I think I would also have to do the same for SDL_image.lib etc…

It is easy to build oncew you figured out the difference int the calling
conventions, but all the same it is not really necessary that erybody does
it over and over again, so I was wondering where to publish or send it so
that others can use it as well.

I am planning (of course no promises) to do that for future releases of SDL
as well. So here comes the question:
Where should I put it? Should I publish it on a subpage of my project or
should I send it to the list or should I send it to the delivery maintainer
(Who is that by the way)?

As far as I can see there are the following pros and cons:

my project site
pro:

  • easy to maintain for me (let it die when my project dies)
  • traffic to my project
  • ?
    con:
  • harder to find for people not intrested in my project per se
  • ?

mailinglist
pro:

  • people on the list have it immediately
  • ?
    con:
  • even harder to find lateron
  • no direct link with the delivery
  • ?

inclusion in sdl delivery
pro:

  • easily available for everybody
  • consitency of the delivery
  • ?
    con:
  • responsability that this brings
  • time
  • ?

So it would be cool if you could comment on this.

cheers,
till
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040716/ffa28e32/attachment.bin

hey till,

maybe you can put all the necesary changes in #defines or something and make
it part of the source?

seems like it wouldnt take any responsibility on your part once you got it
working> ----- Original Message -----

From: till.bay@inf.ethz.ch (Till G. Bay)
To: "‘A list for developers using the SDL library. (includes SDL-announce)’"

Sent: Friday, July 16, 2004 12:55 AM
Subject: [SDL] SDL libs for borland


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hey Alan -

sdl-bounces+till.bay=inf.ethz.ch at libsdl.org wrote:

maybe you can put all the necesary changes in #defines or something and
make
it part of the source?

I don’t mess with the source in order to get libs that can be linked with
borland, but I use two tools from borland in order to extract a SDL.def file
from the SDL.dll file (that was compiles with VC), then I mess with the
SDL.def file (modify it with a texteditor) and generate a SDL.lib file that
is Borland compilant…

That’s a method I found out to work OK. If there is a way to integrate it
with #defines in the source - I am happy to learn about it.

Another possibility would be to provide different VC project settings - one
that compiles to the microsoft calling convention (cdecl if I’m right) - and
andother one that genereates a lib for the borland calling convention
directly.

The VC project settings for the first case exist already - they are
contained in the file VisualC7.zip - now I could add a VisualC7_Borland.zip
for example. (Provided I manage a way to talk Visualstudio into compiling a
lib for borland directly)

The same goes for SDL_image.lib etc…

cheers,
till
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040716/360e6d33/attachment.bin

Hello

Is there any way to use 2 mouse as input in an independent way with
SDL?
I can choose wich joystick to use as input, and i think use 2 as input
in an independant way.
I need to use 2 mouse as input, but i can only access the mouse that
is using X.
Can i have access to another mouse? I have search SDL_mouse.h and i
see no function to
access another mouse.

Here is an excerpt from SDL_events.h. I have asked a question similar
to yours in the past, but only after I read the excerpt below, before
that, I assumed creating a cross-platform game that supported multiple
mice would be difficult, however SDL seems to have built - in support
for it. My question to the SDL mailing list was “which operating
systems support multiple distinct mice?” I don’t remember what their
answer was! But I hope the information below helps you on your quest:
(perhaps you can check the SDL archives for the answer they gave me,
search for the phrase “multiple distinct mice”)

/* Mouse motion event structure /
typedef struct {
Uint8 type; /
SDL_MOUSEMOTION /
Uint8 which; /
The mouse device index /
Uint8 state; /
The current button state /
Uint16 x, y; /
The X/Y coordinates of the mouse /
Sint16 xrel; /
The relative motion in the X direction /
Sint16 yrel; /
The relative motion in the Y direction */
} SDL_MouseMotionEvent;

/* Mouse button event structure /
typedef struct {
Uint8 type; /
SDL_MOUSEBUTTONDOWN or SDL_MOUSEBUTTONUP /
Uint8 which; /
The mouse device index /
Uint8 button; /
The mouse button index /
Uint8 state; /
SDL_PRESSED or SDL_RELEASED /
Uint16 x, y; /
The X/Y coordinates of the mouse at press
time */
} SDL_MouseButtonEvent;On Jul 16, 2004, at 2:48 AM, Alejandro Arrieta Rios wrote:

Thanks

Alejandro Arrieta Rios
CS Student UTFSM
Chile


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hey Alan -

sdl-bounces+till.bay=inf.ethz.ch at libsdl.org wrote:

maybe you can put all the necesary changes in #defines or something
and
make
it part of the source?

I don’t mess with the source in order to get libs that can be linked
with
borland, but I use two tools from borland in order to extract a
SDL.def file
from the SDL.dll file (that was compiles with VC), then I mess with the
SDL.def file (modify it with a texteditor) and generate a SDL.lib file
that
is Borland compilant…

What exactly IS a .lib file to the borland compiler? Does it contain a
nametable for the DLL you extracted SDL.def from?On Jul 16, 2004, at 4:12 AM, Till G. Bay wrote:

That’s a method I found out to work OK. If there is a way to integrate
it
with #defines in the source - I am happy to learn about it.

Another possibility would be to provide different VC project settings

  • one
    that compiles to the microsoft calling convention (cdecl if I’m right)
  • and
    andother one that genereates a lib for the borland calling convention
    directly.

The VC project settings for the first case exist already - they are
contained in the file VisualC7.zip - now I could add a
VisualC7_Borland.zip
for example. (Provided I manage a way to talk Visualstudio into
compiling a
lib for borland directly)

The same goes for SDL_image.lib etc…

cheers,
till


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Donny -

I don’t mess with the source in order to get libs that can be linked with
borland, but I use two tools from borland in order to extract a SDL.def
file

from the SDL.dll file (that was compiles with VC), then I mess with the
SDL.def file (modify it with a texteditor) and generate a SDL.lib file
that

is Borland compilant…

What exactly IS a .lib file to the borland compiler? Does it contain a
nametable for the DLL you extracted SDL.def from?

Afaik - yes. You need to specify a lib file to link your sdl app to the
sdl.dll…
And these lib files look different for the two compilers in question.

cheers till
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040716/eebf2322/attachment.bin

In that case, what kind of hand-editting do you need to do after
running the extraction utility? Perhaps it can be automated in some wayOn Jul 16, 2004, at 5:06 AM, Till G. Bay wrote:

Hi Donny -

I don’t mess with the source in order to get libs that can be linked
with
borland, but I use two tools from borland in order to extract a
SDL.def
file

from the SDL.dll file (that was compiles with VC), then I mess with
the
SDL.def file (modify it with a texteditor) and generate a SDL.lib
file
that

is Borland compilant…

What exactly IS a .lib file to the borland compiler? Does it contain a
nametable for the DLL you extracted SDL.def from?

Afaik - yes. You need to specify a lib file to link your sdl app to the
sdl.dll…
And these lib files look different for the two compilers in question.

cheers till


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Donny -

sdl-bounces at libsdl.org wrote:

In that case, what kind of hand-editting do you need to do after
running the extraction utility? Perhaps it can be automated in some way

Yeah it surely could - but that is for later when I know where to put what I
already have.

If you want to know what needs to be done:
http://www.bcbdev.com/articles/vcdll.htm

cheers,
till
-------------- next part --------------
A non-text attachment was scrubbed…
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20040716/f5e35570/attachment.bin

I built an SDL.lib for the free borland compiler - the one that is in the
actual SDL delivery (http://www.libsdl.org/release/SDL-1.2.7.zip) is from
SDL 1.2.4 so there are things that have changed since then.

I am planning (of course no promises) to do that for future releases of SDL
as well. So here comes the question:
Where should I put it? Should I publish it on a subpage of my project or
should I send it to the list or should I send it to the delivery maintainer
(Who is that by the way)?

If you publish a link, I will add the link to the SDL download page.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment