win API prolem - joystickfunction

Posted By: TheThinker

win API prolem - joystickfunction - 02/22/10 03:27

Hi,
Perhaps there is somebody who konws the winApi.
I need your help.
Situation:
I have made an easy game that uses up to 10 gamepads.
I am using on_scanmessage to catch the massages.
I call "joySetCapture(...)" to register a joystick/gamepad.
(I don't want to use DirectInput, because I don't know how to use this in Lite-C)

This runs without any problems, but:
I can only call "joySetCapture(...)" within the "main" - void.
In main function it doesn't matter how many frames passed.

Sometimes I don't understand the API thing.

edit:

Even if it is not possible to detect joysticks at runtime, I want to outsource the function too cleanup my main function.

MfG,
Patrick
Posted By: TheThinker

Re: win API prolem - joystickfunction - 02/22/10 17:45

EDIT:

Ok, solved the problem.
I forgot to write WINAPI before the function prototypes.

It is strange that this runs for the first to joysticks..


© 2023 lite-C Forums