overbound / SonicTimeTwisted

Source Code for a Sonic Fan Game Made in Game Maker Studio
https://overboundstudio.com/
GNU General Public License v3.0
58 stars 16 forks source link

Gamepad: need to relaunch the game to apply settings #60

Closed AlexKhayrullin closed 3 years ago

AlexKhayrullin commented 4 years ago

After remapping the gamepad, it looks like the game needs to be relaunched in order for the gamepad to work.

This appears to be exclusive to the 1.1 branch.

AlexKhayrullin commented 4 years ago

The base issue is indeed fixed by @nkrapivin's pull request, but a problem remains: the directions seem to be automatically remapped to the left stick on startup.

nkrapivin commented 4 years ago

huh. What do you mean? left-or right stick is controlled by the axis value, not by the direction.

AlexKhayrullin commented 4 years ago

I mean that twice I remapped directions to my gamepad's D-Pad instead of the left stick, but on game restart, they were back on the left stick.

nkrapivin commented 4 years ago

huh, now that's interesting.

I'll check that. So I remap from... DPAD UP for example to LSTICK UP, and then back to DPAD UP?

AlexKhayrullin commented 4 years ago

I don't know what causes it ^^. But I started the game, directions were mapped to the left stick, I remapped them to the D-Pad, then played some. Restarted the game, and the directions were again mapped to the left stick.

nkrapivin commented 4 years ago

Sadly I can't reproduce it.

My steps (Windows machine):

nkrapivin commented 4 years ago

https://github.com/overbound/SonicTimeTwisted/blob/release/1.1/SonicTimeTwisted.gmx/scripts/input_any_gamepad_axis.gml#L3 This is redundant. objInput already initializes an array padarray with length padcount which is gamepad_get_device_count(). This value is static. on Windows it's 12, on Linux it's 32, on Android it depends on the phone, on PS4 it's 4 (PS4 only allows four concurrent "users" (controllers) logged in at the same time).

AlexKhayrullin commented 3 years ago

No longer the case since the refactoring done for #85