Re: [hatari-devel] Joystick dialog crashes with Ubuntu 24.04

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 6.7.2024 9.58, Thomas Huth wrote:
Am Sat,  6 Jul 2024 06:05:03 +0000
schrieb Thomas Huth <th.huth@xxxxxxxxx>:
That looks fishy ... how do you distinguish now between no joystick and one
joystick? Both will return 0 now here.

Thinking about this twice, it's likely ok. We seem to be using ID 0 for
disabled joysticks all over the place, so this seems to be the right fix
for getting rid of the bad nJoyId == -1 in the configuration.

Yes, that was my thinking.

(One needs to add check for that somewhere, and it seemed better to localize & document it instead of current and future callers needing to handle negative indexes.)


With regards to this hunk:
....
I think I'd change it to:
....
to avoid that you accidentally disable keyboard emulation where it is not
necessary.

Good point, I'll add that.


With that change, you patch looks fine to me.

Thanks.  Pushed.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/