Posts: 660
Threads: 83
Joined: Nov 2023
Reputation:
7
Sorry for releasing another version a day after the previous one, but I bought myself a nice gamepad and therefor had to add joystick support
2025-07-13- Added joystick support through the functions 'joyx', 'joyy' and 'joybutton' (examples/help/joystick.n7)
https://naalaa.com/n7/N7_250713.zip
If anyone has a device with an analogue primary stick, feel free to tell me if it works as expected (by running the example mentioned above).
Posts: 178
Threads: 14
Joined: Dec 2023
Reputation:
8
Thanks Marcus - joystick support will be very useful.......
Posts: 424
Threads: 57
Joined: Nov 2023
Reputation:
3
07-14-2025, 02:42 AM
(This post was last modified: 10-17-2025, 08:04 AM by Marcus.)
I still have a joystick that I bought over 15 years ago, and here it is being tested with the latest release of the N7 :
Up,Down.Left,Right = OK
Button 1,2,3,4 = OK
Thanks, Marcus
Posts: 660
Threads: 83
Joined: Nov 2023
Reputation:
7
07-14-2025, 04:58 AM
(This post was last modified: 10-17-2025, 08:04 AM by Marcus.)
(07-14-2025, 02:42 AM)1micha.elok Wrote: I still have a joystick that I bought over 15 years ago, and here it is being tested with the latest release of the N7 :
Up,Down.Left,Right = OK
Button 1,2,3,4 = OK
Thanks, Marcus 
Thanks for testing!
Posts: 660
Threads: 83
Joined: Nov 2023
Reputation:
7
(07-14-2025, 02:42 AM)1micha.elok Wrote: I still have a joystick that I bought over 15 years ago, and here it is being tested with the latest release of the N7 :
Up,Down.Left,Right = OK
Button 1,2,3,4 = OK
Thanks, Marcus 
Did 'joyx' and 'joyy' react to the digital directional buttons or one of the analogue sticks? If it was an analogue stick, did pushing it just slightly make the square move slower?
I'm using old functions in winapi for this, so it is what it is, but I'm still curious
Posts: 424
Threads: 57
Joined: Nov 2023
Reputation:
3
07-14-2025, 11:41 AM
(This post was last modified: 07-14-2025, 11:52 AM by 1micha.elok.)
(07-14-2025, 06:37 AM)Marcus Wrote: ...
Did 'joyx' and 'joyy' react to the digital directional buttons or one of the analogue sticks? If it was an analogue stick, did pushing it just slightly make the square move slower?
I'm using old functions in winapi for this, so it is what it is, but I'm still curious 
My old gamepad has digital directional buttons and "thumbsticks" ( I prefer calling them thumbsticks rather than joysticks). Both the buttons and thumbsticks return values of -1,0 and 1 and I don't notice any difference between them - they functions the same way. Maybe the thumbsticks aren't true analog sticks like the ones on standard joysticks....another possibility, there's an "Analog" button (you can see it in the middle, between the thumbsticks) on my old gamepad, but it doesn't work anymore. I think it's broken.
Posts: 660
Threads: 83
Joined: Nov 2023
Reputation:
7
07-14-2025, 12:06 PM
(This post was last modified: 07-14-2025, 12:15 PM by Marcus.)
(07-14-2025, 11:41 AM)1micha.elok Wrote: (07-14-2025, 06:37 AM)Marcus Wrote: ...
Did 'joyx' and 'joyy' react to the digital directional buttons or one of the analogue sticks? If it was an analogue stick, did pushing it just slightly make the square move slower?
I'm using old functions in winapi for this, so it is what it is, but I'm still curious 
My old gamepad has digital directional buttons and "thumbsticks" ( I prefer calling them thumbsticks rather than joysticks). Both the buttons and thumbsticks return values of -1,0 and 1 and I don't notice any difference between them - they functions the same way. Maybe the thumbsticks aren't true analog sticks like the ones on standard joysticks....another possibility, there's an "Analog" button (you can see it in the middle, between the thumbsticks) on my old gamepad, but it doesn't work anymore. I think it's broken.
Ah, okay! Yeah, I remember there being an analog on/off button on playstation controllers too  I'll ask my son if he has any controllers when he comes home from work.
|