Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#1 driver poll event

Edwad Mohov

Good day dear Shaul.
When we use mouse for emulate joystick movements, we accumulate mouse movement portions until joystick poll (by game application for example and of course =) ) not occured. On joystick poll, driver return accumulated value and reset 'accumulator' - it's like return virtual joystick at his neutral position.
The problem is that we don't know when game requests joystick position from driver, because
driver don't get any 'driver poll' flag (or better - polls counter) to application, that convert mouse movements to joystick position. May be other way is posibility of process poll event by some extern dll...
So, is it possilbe that driver return extra information - polls counter? (if my understanding of the algorithm correct =) ).


  • Shaul

    Hi Edward,
    I'm not sure I understand your request. I have a few questions before we can discuss you request further-on.
    1. Do you have an application that communicates with vJoy? Can you describe the problem.
    2. If I understand correctly, a mouse send differential data (deltas). It is the job of your application to convert the data to absolute data (position data). The application can send as much positions as it can - vJoy will always use the latest to move the joystick.
    3. Drivers do not communicate directly with applications. It is of course possible but it gives the application an option to stall the driver. Having said that - applications can sometimes configure drivers through special ports. However, the configuring application is usually written by the author of the driver so that this data will not be exposed.

    Thank you for your interest
    Shaul Eizikovich

  • Edwad Mohov
    Edwad Mohov

    Hi, Shaul.
    1. Some time ago I try to emulate joystick (by mouse) for the TieFighter - game (with help of PPjoy) . And problem is that emulator (that set absolute joystick position data using PPjoy or Vjoy), dont know when game requests joystick position. Driver (vJoy) know, when game requests joystick position? Could you answer?
    2. Yes, emulator application convert mouse differential data (deltas) to joystick position data, but last depends on 'game request events', because at this moments position data must be send to game and resets to neutral (position must be neutral when mouse stops).
    3. May be possibility to read (same way as we set position data) game request counter will be enougth.

    Thanks for your attension.
    Edward K.

  • Shaul

    Hi Edward,
    The driver does not communicate directly with the application (e.g. game). The application requests the system for these data and the system returns the data. It is up to the system to poll the data from the driver-stack. It does not necessarily requests the data when it is asked for the data.
    This means that the driver does not know WHO asked for the data, or even when. The driver only communicate with the driver above it.
    You will have to find a way to detect when the game application requested the data.



Cancel   Add attachments