Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psychonauts: Anolog stick broken in menu. #157

Closed
Bitwolfies opened this issue Jan 28, 2022 · 5 comments
Closed

Psychonauts: Anolog stick broken in menu. #157

Bitwolfies opened this issue Jan 28, 2022 · 5 comments
Assignees
Milestone

Comments

@Bitwolfies
Copy link

When using the compat, anolog stick movement in the menus no longer works, but its fine with the real binaries. The stick still can be used for movement however.

@sulix
Copy link
Contributor

sulix commented Jan 28, 2022

This works fine for me: joystick behaviour is exactly the same between SDL1.2 and sdl12-compat, with the analogue stick working fine in both. (The left analogue stick on my weird, knock-off PS2 controller works, the right one doesn't control the menu.)

What joystick/gamepad are you using, and does it work in other SDL2 games? Does setting SDL_JOYSTICK_HIDAPI=0 help?

@icculus
Copy link
Collaborator

icculus commented Jan 28, 2022

Actually, this brings up a good question, regardless of the problem here:

Do we want to add an option to expose SDL2 game controllers as joysticks? They still look the same to the 1.2 app, but it guarantees that the button and axis ordering is reliable between devices.

@slouken
Copy link
Collaborator

slouken commented Jan 28, 2022

Actually, this brings up a good question, regardless of the problem here:

Do we want to add an option to expose SDL2 game controllers as joysticks? They still look the same to the 1.2 app, but it guarantees that the button and axis ordering is reliable between devices.

Hmm, that's an interesting idea...

@icculus icculus self-assigned this Aug 13, 2022
@icculus icculus added this to the 1.2.54 milestone Aug 13, 2022
icculus added a commit that referenced this issue Aug 14, 2022
This makes the joysticks consistent, as their device indexes won't change,
like SDL 1.2 worked.

Also, it can optionally use SDL2 game controllers for devices, which has
some interesting tradeoffs.

Reference issue #157.
@icculus
Copy link
Collaborator

icculus commented Aug 14, 2022

Ok, two changes in that patch worth mentioning:

  • SDL 1.2 had no concept of joystick hotplug, so the initial device list was the final list, too...if something got unplugged, it would just fail to open, or stop sending new data, afaict. Now we also take a list at startup, open all the devices, and hold onto them in case the 1.2 app wants them, so the list can stay consistent. Previously, we'd just pass the device indices through to SDL2, but these aren't stable there.
  • Now you can set a hint to use game controllers instead of joysticks, which might give you more control, since you get reliable axis/button ordering and can adjust it to make it work with whatever a game might need...not to mention dead zones, making hats look like buttons, etc.

My hope is that this can work around any Psychonauts issue, as it's probably an axis that doesn't sit at zero when idle (perhaps a trigger?) confusing things, and with game controllers, that won't be axis 0 and 1 anymore.

@icculus
Copy link
Collaborator

icculus commented Aug 18, 2022

My hope is that this can work around any Psychonauts issue

(And since there's not much else to do here, I'm closing the bug; we can reopen if anything new information pops up.)

@icculus icculus closed this as completed Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants