[Bug] Input configuration issues #57

Open
opened 2024-10-25 09:14:01 +00:00 by TheEarthrise · 18 comments
TheEarthrise commented 2024-10-25 09:14:01 +00:00 (Migrated from github.com)

Description of the issue

The input configuration has many issues since the UI was changed to Avalonia. I'll try to list them here.

  1. The current configuration of an input device is not shown in the GUI if you switch the player via the drop-down. You always see the default configuration, not the configuration that is actually saved to the config file.

    This was resolved via #122

  2. Every gamepad needs it's own profile, even if they are the same. If you have e.g. two XBOX One S gamepads and want to use them with two players, you need to create two profiles to be able to load the config. This is because the config is bound to a device "ID" in the saved profile. With GTK (or any other emulator) you could create one profile for e. g. an X-Input gamepad and apply it to any other X-Input device, no matter the vendor. Right now, you have to create new profiles for every device that has a different ID. The ID is changing per device type and per device count. This means if you had e.g. four XBOX One S gamepads connected, you would need to create a separate profile for each of them, even though your key configuration is the same every time. If you look in the saved profiles, you'll see something like this:

    1st profle: "id": "0-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (1st XBOX One S gamepad)
    2nd profile: "id": "1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (2nd XBOX One S gamepad)
    3rd profile: "id": "2-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (3rd XBOX One S gamepad)
    4th profile: "id": "3-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (4th XBOX One S gamepad)
    5th profile: "id": "0-yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" (1st XBOX One Elite gamepad)

    x/y is some device id that seem to differ only if the device is not of the same type, like e. g. a XBOX One Elite gamepad has not the same ID as a XBOX One S gamepad.

    This was resolved via #708

  3. If a gamepad disconnects while playing (e. g. battery empty or the gamepad goes to sleep), it is sometimes impossible to reconnect it without the need to close the emulator. If you just turn the gamepad back on, the emulator won't detect it. This seems to be random and I have to figure out how to safely reproduce it.

Reproduction steps

  1. Switch to e. g. player 2, set some custom keys, save the configuration, switch to player 1 and then back to player 2. Your customized settings are not shown, even though they are written to the config file correctly.

  2. Connect two gamepads of the same type at the same time. Assign one to player 1 and one to player 2. Create a custom key-profile for the gamepad assigned to player 1 and then try to apply it to the gamepad connected to player 2. The configuration will not load, since the gamepad ID saved to the profile is not identical to the gamepad you selected for player 2. The same applies to different gamepads with the same key layout, e. g. you can not apply a profile created for a XBOX One S gamepad to a XBOX One Elite gamepad, since the saved IDs are not matching.

### Description of the issue The input configuration has many issues since the UI was changed to Avalonia. I'll try to list them here. 1. The current configuration of an input device is not shown in the GUI if you switch the player via the drop-down. You always see the default configuration, not the configuration that is actually saved to the config file. **This was resolved via #122** 2. Every gamepad needs it's own profile, even if they are the same. If you have e.g. two XBOX One S gamepads and want to use them with two players, you need to create two profiles to be able to load the config. This is because the config is bound to a device "ID" in the saved profile. With GTK (or any other emulator) you could create one profile for e. g. an X-Input gamepad and apply it to any other X-Input device, no matter the vendor. Right now, you have to create new profiles for every device that has a different ID. The ID is changing per device type and per device count. This means if you had e.g. four XBOX One S gamepads connected, you would need to create a separate profile for each of them, even though your key configuration is the same every time. If you look in the saved profiles, you'll see something like this: 1st profle: "id": "0-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (1st XBOX One S gamepad) 2nd profile: "id": "1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (2nd XBOX One S gamepad) 3rd profile: "id": "2-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (3rd XBOX One S gamepad) 4th profile: "id": "3-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" (4th XBOX One S gamepad) 5th profile: "id": "0-yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" (1st XBOX One Elite gamepad) x/y is some device id that seem to differ only if the device is not of the same type, like e. g. a XBOX One Elite gamepad has not the same ID as a XBOX One S gamepad. **This was resolved via #708** 3. If a gamepad disconnects while playing (e. g. battery empty or the gamepad goes to sleep), it is sometimes impossible to reconnect it without the need to close the emulator. If you just turn the gamepad back on, the emulator won't detect it. This seems to be random and I have to figure out how to safely reproduce it. ### Reproduction steps 1. Switch to e. g. player 2, set some custom keys, save the configuration, switch to player 1 and then back to player 2. Your customized settings are not shown, even though they are written to the config file correctly. 2. Connect two gamepads of the same type at the same time. Assign one to player 1 and one to player 2. Create a custom key-profile for the gamepad assigned to player 1 and then try to apply it to the gamepad connected to player 2. The configuration will not load, since the gamepad ID saved to the profile is not identical to the gamepad you selected for player 2. The same applies to different gamepads with the same key layout, e. g. you can not apply a profile created for a XBOX One S gamepad to a XBOX One Elite gamepad, since the saved IDs are not matching.
hgreedy commented 2024-11-17 16:29:35 +00:00 (Migrated from github.com)

Hey

have the same issue with the user interface in input settings.
Player 1 and profile drop down menu are not applicable.
But if I right click then I can select it.
But with detours (mouse wheel, keyboard, etc.).
Teested in version 1.2.72 and 1.2.41.
I hope it will be fixed later.

Thanks for the good work

Hey have the same issue with the user interface in input settings. Player 1 and profile drop down menu are not applicable. But if I right click then I can select it. But with detours (mouse wheel, keyboard, etc.). Teested in version 1.2.72 and 1.2.41. I hope it will be fixed later. Thanks for the good work
Deadhuntz commented 2024-11-17 20:23:12 +00:00 (Migrated from github.com)

Hey

have the same issue with the user interface in input settings. Player 1 and profile drop down menu are not applicable. But if I right click then I can select it. But with detours (mouse wheel, keyboard, etc.). Teested in version 1.2.72 and 1.2.41. I hope it will be fixed later.

Thanks for the good work

Same for me.

> Hey > > have the same issue with the user interface in input settings. Player 1 and profile drop down menu are not applicable. But if I right click then I can select it. But with detours (mouse wheel, keyboard, etc.). Teested in version 1.2.72 and 1.2.41. I hope it will be fixed later. > > Thanks for the good work Same for me.
VincentAdamNemessisX commented 2024-11-19 02:39:39 +00:00 (Migrated from github.com)

This problem seems like a old one in original ryujinx and yuzu, their profile management is so bad that almost can't work as well as steam or other platforms.

This problem seems like a old one in original ryujinx and yuzu, their profile management is so bad that almost can't work as well as steam or other platforms.
Goodfeat commented 2025-02-23 07:24:04 +00:00 (Migrated from github.com)

Please take a look here, is the performance issue fixed by this pull request?
https://github.com/Ryubing/Ryujinx/pull/708

Please take a look here, is the performance issue fixed by this pull request? https://github.com/Ryubing/Ryujinx/pull/708
TheEarthrise commented 2025-02-28 06:20:05 +00:00 (Migrated from github.com)

Hey, the first problem mentioned was kinda resolved by PR #122 , though there remains a small bug with the slider values. If you have set them to something else and then swap the players, it will show the wrong standard values with the correct slider position.

Before swapping players:
Image

After swapping players:
Image

The second and really annoying problem descibed here (the one with the profiles) remains unchanged.

Hey, the first problem mentioned was kinda resolved by PR #122 , though there remains a small bug with the slider values. If you have set them to something else and then swap the players, it will show the wrong standard values with the correct slider position. Before swapping players: ![Image](https://github.com/user-attachments/assets/e981b35e-c0ae-4750-9235-27d0cd243877) After swapping players: ![Image](https://github.com/user-attachments/assets/755dbef8-4361-4032-9192-b32d92b01e76) The second and really annoying problem descibed here (the one with the profiles) remains unchanged.
Goodfeat commented 2025-03-01 11:10:14 +00:00 (Migrated from github.com)

@TheEarthrise Maybe I'm reproducing the bug incorrectly, but it looks like the sliders work fine in the current version of Canary. If a change has occurred, a dialog box appears before switching to another player

https://github.com/user-attachments/assets/f2146a0c-0565-4101-9967-b923a96e7dc6

Your second problem, if I understood correctly, is that if you apply a profile, then the gamepad itself changes along with the profile. If I understood everything correctly, then this problem can be fixed, and the profile can be applied without changing the gamepad

https://github.com/user-attachments/assets/99759a09-972e-40ad-a724-ef556ecb8c57

@TheEarthrise Maybe I'm reproducing the bug incorrectly, but it looks like the sliders work fine in the current version of Canary. If a change has occurred, a dialog box appears before switching to another player https://github.com/user-attachments/assets/f2146a0c-0565-4101-9967-b923a96e7dc6 Your second problem, if I understood correctly, is that if you apply a profile, then the gamepad itself changes along with the profile. If I understood everything correctly, then this problem can be fixed, and the profile can be applied without changing the gamepad https://github.com/user-attachments/assets/99759a09-972e-40ad-a724-ef556ecb8c57
TheEarthrise commented 2025-03-02 09:32:32 +00:00 (Migrated from github.com)

Hey,

here is a video about the issue with the config files:

https://github.com/user-attachments/assets/4fedf6e7-3f81-4800-9682-c3dbefd90f99

The profiles you save are somewhat bound to a specific device, connected to a specific "slot" (NOT player!). In this video I have three devices connected, two XBOX One S gamepads and one XBOX Elite gamepad. I need so save profiles for ech gamepad, since if loaded for another gamepad, the selected gamepad is changed to the one the profile was created with. At the end, none of the saved profiles is working for the disconnected and then reconnected gamepad.

Here are some timestamps, but I recommend to watch the whole thing.

1:21 - Notice the very odd behaviour at changing the name! While the name is selected, I first pressed arrow right, to get to the end of the name, but the cursor ends up on the left. Then I pressed backspace to delete the "1", which is then oddly replaced by a "0" and the cursor ends up to be in front if it.

1:42 - Disconnect of 1st XBOX One S Gamepad
2:24 - Disconnect of 2nd XBOX One S Gamepad
2:45 - Connect of 1st XBOX One S Gamepad
2:50 - 1st saved profile for XBOX One S Gamepad is not working
3:05 - 2nd saved profile for XBOX One S Gamepad is not working as well

While testing, I noticed another issue: you can not delete a profile, if you have not selected a gamepad. Here is a video as well:

https://github.com/user-attachments/assets/02333601-2d35-4830-8fda-a0b44c4ceac1

As for the slider thing: I need to re-check this, since I can not reproduce it which the PC I am at right now.

Hey, here is a video about the issue with the config files: https://github.com/user-attachments/assets/4fedf6e7-3f81-4800-9682-c3dbefd90f99 The profiles you save are somewhat bound to a specific device, connected to a specific "slot" (NOT player!). In this video I have three devices connected, two XBOX One S gamepads and one XBOX Elite gamepad. I need so save profiles for ech gamepad, since if loaded for another gamepad, the selected gamepad is changed to the one the profile was created with. At the end, none of the saved profiles is working for the disconnected and then reconnected gamepad. Here are some timestamps, but I recommend to watch the whole thing. 1:21 - Notice the very odd behaviour at changing the name! While the name is selected, I first pressed arrow right, to get to the end of the name, but the cursor ends up on the left. Then I pressed backspace to delete the "1", which is then oddly replaced by a "0" and the cursor ends up to be in front if it. 1:42 - Disconnect of 1st XBOX One S Gamepad 2:24 - Disconnect of 2nd XBOX One S Gamepad 2:45 - Connect of 1st XBOX One S Gamepad 2:50 - 1st saved profile for XBOX One S Gamepad is not working 3:05 - 2nd saved profile for XBOX One S Gamepad is not working as well While testing, I noticed another issue: you can not delete a profile, if you have not selected a gamepad. Here is a video as well: https://github.com/user-attachments/assets/02333601-2d35-4830-8fda-a0b44c4ceac1 As for the slider thing: I need to re-check this, since I can not reproduce it which the PC I am at right now.
Goodfeat commented 2025-03-02 09:52:00 +00:00 (Migrated from github.com)

@TheEarthrise I made a new commit today, I made a change to the profile system. Now they are not tied to the gamepad. If this option is acceptable, I will leave it in the pull request
https://github.com/Ryubing/Ryujinx/pull/708#issuecomment-2676469138

In the first video I have already fixed most of the problems, please check the assembly that was done automatically in the pull request https://github.com/Ryubing/Ryujinx/pull/708

@TheEarthrise I made a new commit today, I made a change to the profile system. Now they are not tied to the gamepad. If this option is acceptable, I will leave it in the pull request https://github.com/Ryubing/Ryujinx/pull/708#issuecomment-2676469138 In the first video I have already fixed most of the problems, please check the assembly that was done automatically in the pull request https://github.com/Ryubing/Ryujinx/pull/708
TheEarthrise commented 2025-03-02 10:52:05 +00:00 (Migrated from github.com)

@Goodfeat I tried your changes and they kinda work, though I don't get the point of the "unlink" button. If I create a profile with e.g. my XBOX Elite gamepad, I indeed can apply the saved profile to an XBOX One S gamepad as well. If I have not connected the Elite gamepad while applying the profile to the One S gamepad, I get the "Waiting for controller connection..." message.

Both screenshots are made right after clicking the "load profile" button:

Elite gamepad still connected, selected input device is XBOX One S Gamepad:
Image

Elite gamepad disconnected, selected input device is XBOX One S Gamepad:
Image

In both cases, if I click "Apply", the settings are saved to the configuration file with the correct device ID. What is the purpose of the unlink button?

@Goodfeat I tried your changes and they kinda work, though I don't get the point of the "unlink" button. If I create a profile with e.g. my XBOX Elite gamepad, I indeed can apply the saved profile to an XBOX One S gamepad as well. If I have not connected the Elite gamepad while applying the profile to the One S gamepad, I get the "Waiting for controller connection..." message. Both screenshots are made right after clicking the "load profile" button: Elite gamepad still connected, selected input device is XBOX One S Gamepad: ![Image](https://github.com/user-attachments/assets/eaa29c83-a8d2-4b93-b1af-bec0ca3f0341) Elite gamepad disconnected, selected input device is XBOX One S Gamepad: ![Image](https://github.com/user-attachments/assets/70e1c35d-3e26-41bf-8b49-973539e9049d) In both cases, if I click "Apply", the settings are saved to the configuration file with the correct device ID. What is the purpose of the unlink button?
Goodfeat commented 2025-03-02 11:00:39 +00:00 (Migrated from github.com)

This setting allows you to save the state when the gamepad is not needed in the slot. You just need to save the state disabled. And this notification shows that the gamepad is paired and waiting for it to be connected.

There is a bug on the second screenshot, I have not fixed it yet. In theory, this message should only appear if you have disconnected the gamepad

This setting allows you to save the state when the gamepad is not needed in the slot. You just need to save the state disabled. And this notification shows that the gamepad is paired and waiting for it to be connected. There is a bug on the second screenshot, I have not fixed it yet. In theory, this message should only appear if you have disconnected the gamepad
TheEarthrise commented 2025-03-02 11:04:35 +00:00 (Migrated from github.com)

That message seems kinda connected to the saved profile, since it only appears on the One S gamepad, if I load the profile created with the Elite gamepad, while the Eilte gamepad is not connected.

That message seems kinda connected to the saved profile, since it only appears on the One S gamepad, if I load the profile created with the Elite gamepad, while the Eilte gamepad is not connected.
Goodfeat commented 2025-03-02 11:10:58 +00:00 (Migrated from github.com)

Inside each preset there is data about the gamepad, I either need to remove it from the preset, or I need to remove the data about the device identifier. Due to the fact that data about another device is read from the preset, but it is disabled, an unplanned message is obtained, which in fact does nothing

Inside each preset there is data about the gamepad, I either need to remove it from the preset, or I need to remove the data about the device identifier. Due to the fact that data about another device is read from the preset, but it is disabled, an unplanned message is obtained, which in fact does nothing
TheEarthrise commented 2025-03-02 11:36:26 +00:00 (Migrated from github.com)

I see two possibilities:

  1. We need the device ID inside the saved profiles, because we want/need to do something with it in that place.
  2. We want to use the profiles just as customized gamepad configuration presets, that can be loaded to any gamepad, therefore we don't need it in the profiles.

Since the device IDs are written to the configuration file, I wonder why we also need them in the profiles? Maybe, at some point, the plan was to do something with the profiles, other than just load custom gamepad configurations. Unfortunately, the entire GUI has been neglected, so if there was such a plan, it was never finished.

I see two possibilities: 1. We need the device ID inside the saved profiles, because we want/need to do something with it in that place. 2. We want to use the profiles just as customized gamepad configuration presets, that can be loaded to any gamepad, therefore we don't need it in the profiles. Since the device IDs are written to the configuration file, I wonder why we also need them in the profiles? Maybe, at some point, the plan was to do something with the profiles, other than just load custom gamepad configurations. Unfortunately, the entire GUI has been neglected, so if there was such a plan, it was never finished.
TheEarthrise commented 2025-03-02 11:41:47 +00:00 (Migrated from github.com)

Another idea would be not to write the gamepad configuration itself to the configuration file, but the last selected profiles per player, and then load the gamepad configuration from there. In this case, you would need the device ID in the profiles.

Another idea would be not to write the gamepad configuration itself to the configuration file, but the last selected profiles per player, and then load the gamepad configuration from there. In this case, you would need the device ID in the profiles.
TheEarthrise commented 2025-03-02 11:48:03 +00:00 (Migrated from github.com)

Anyway, being able to apply a profile to any gamepad, no matter which gamepad it was created with, is a big plus! Thank you so much!

Anyway, being able to apply a profile to any gamepad, no matter which gamepad it was created with, is a big plus! Thank you so much!
Goodfeat commented 2025-03-02 11:51:21 +00:00 (Migrated from github.com)

Поскольку идентификаторы устройств записываются в файл конфигурации, интересно, зачем они нам нужны в профилях?

That's exactly what they're for, so that presets can be applied with a gamepad. But then the whole point of presets is lost, since presets should be applied to any gamepad.

By the way, I found a way to ignore device IDs in presets, now it works as intended

But it would be better to remove the IDs from the preset files themselves

> Поскольку идентификаторы устройств записываются в файл конфигурации, интересно, зачем они нам нужны в профилях? That's exactly what they're for, so that presets can be applied with a gamepad. But then the whole point of presets is lost, since presets should be applied to any gamepad. By the way, I found a way to ignore device IDs in presets, now it works as intended But it would be better to remove the IDs from the preset files themselves
TheEarthrise commented 2025-03-02 12:03:28 +00:00 (Migrated from github.com)

But it would be better to remove the IDs from the preset files themselves

Yeah, as far as I'm concerned, I agree with that.

> But it would be better to remove the IDs from the preset files themselves Yeah, as far as I'm concerned, I agree with that.
Goodfeat commented 2025-03-02 14:16:40 +00:00 (Migrated from github.com)

I made another commit that fixes the bug related to the device ID, you can update the emulator file by downloading it from the same link.

Regarding your third point about devices being disabled when switching, this is most likely not going to be fixed anytime soon. The problem is in the SDL.dll library and how it queries devices.

I made another commit that fixes the bug related to the device ID, you can update the emulator file by downloading it from the same link. Regarding your third point about devices being disabled when switching, this is most likely not going to be fixed anytime soon. The problem is in the SDL.dll library and how it queries devices.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MeloNX/Ryujinx-ryubing#57
No description provided.