Updated today with the addition of the joyGetPOV(joyId) function for reading pov/hat control. It returns -1 when centered, otherwise 0-360 depending on direction. The attached joystick-demo is also updated to make use of the new function.
I also made some work in the scripting to make it easier to add new functions. This included a rewrite of the runtime stack-handling of scripting which can make a big performance boost on scripts that work on local data such as for-loops that performs simple arithmetic. Note that local variables are no longer initialized to zero, instead they are undefined just like in Pascal and C.
Also the built-in functions now perform type-checking on their parameters so for instance joyId-parameter in the joyGetPOV-function is an integer. Previously all built-in functions were using float-parameters and return values.
Beta release 1.9.6b
Moderator: Moderators