iPhone SDL_GetMouseState

Greetings,

Got the iPhone lib built, and for the most part works great - thanks!

I am getting an error with a few of the iPhone demos:

SDL_GetMouseState(&x, &y);

/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: warning: passing
argument 1 of ‘SDL_GetMouseState’ makes integer from pointer without a
cast
/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: error: too few
arguments to function ‘SDL_GetMouseState’

It appears that it is missing the index parameter:

SDL_GetMouseState(int index, int *x, int *y);

It compiles if I pass 0 for the index, can anyone recommend on what
should be the value for index?

Thanks,

Jeshua Lacock
Founder/Programmer
3DTOPO Incorporated
http://3DTOPO.com
Phone: 877.240.1364

Support for touch on the iPhone / iPod Touch screen is added to the SDL
Port as multiple mouse objects, im almost certain that the index value
passed, is to choose the “mouse” / finger that you want the mouse state
from.

Kind regards
Mathias Hansen

Jeshua Lacock skrev:>

Greetings,

Got the iPhone lib built, and for the most part works great - thanks!

I am getting an error with a few of the iPhone demos:

SDL_GetMouseState(&x, &y);

/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: warning: passing
argument 1 of ‘SDL_GetMouseState’ makes integer from pointer without a cast
/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: error: too few
arguments to function ‘SDL_GetMouseState’

It appears that it is missing the index parameter:

SDL_GetMouseState(int index, int *x, int *y);

It compiles if I pass 0 for the index, can anyone recommend on what
should be the value for index?

Thanks,

Jeshua Lacock
Founder/Programmer
3DTOPO Incorporated
http://3DTOPO.com
Phone: 877.240.1364

Greetings,

Got the iPhone lib built, and for the most part works great - thanks!

I am getting an error with a few of the iPhone demos:

SDL_GetMouseState(&x, &y);

/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: warning: passing
argument 1 of ‘SDL_GetMouseState’ makes integer from pointer without a
cast
/usr/src/SDL/XCodeiPhoneOS/Demos/src/fireworks.c:437: error: too few
arguments to function ‘SDL_GetMouseState’

Yes, you should be able to use index 0, at least for basic functionality.

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

By the way, did you do any trick to get them to link? I keep getting
a missing SDL library with the default projects.

Just the SDL_HAPTIC_DISABLED error which was fixed by adding the CFLAG
-DSDL_HAPTIC_DISABLED.

What is the exact error you are experiencing?

Best,

Jeshua Lacock
Founder/Programmer
3DTOPO Incorporated
http://3DTOPO.com
Phone: 877.240.1364On Oct 15, 2008, at 2:34 PM, Sam Lantinga wrote: