sdl2 guid, remove the CRC bytes (4 first characters) and replace with 0000 when creating guid #753

Open
Tartifless wants to merge 8 commits from Tartifless/master into master

View File

@ -57,16 +57,19 @@ namespace Ryujinx.Input.SDL2
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
return null;
}
// Remove the first 4 char of the guid (CRC part) to make it stable
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
string guidString = "0000" + guid.ToString().Substring(4);
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
string id;
lock (_lock)
{
int guidIndex = 0;
id = guidIndex + "-" + guid;
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
id = guidIndex + "-" + guidString;
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
while (_gamepadsIds.Contains(id))
{
id = (++guidIndex) + "-" + guid;
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
id = (++guidIndex) + "-" + guidString;
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
}
}

Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Goodfeat commented 2025-03-06 09:55:42 +00:00 (Migrated from github.com)
Review

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads.

You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works

image

It seems that this does not affect compatibility with other gamepads, the only thing is that you need to reconfigure all previously connected gamepads. You can instead of zeros write a unique identifier for the emulator, for example RYUX and this also works ![image](https://github.com/user-attachments/assets/d9e52776-5a20-487c-b111-adcda8d23f63)
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Tartifless commented 2025-03-06 09:58:17 +00:00 (Migrated from github.com)
Review

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl

Why use this when sdl2 guid is with 0000, that would make it specific while 0000 keeps standard sdl
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Goodfeat commented 2025-03-06 10:09:38 +00:00 (Migrated from github.com)
Review

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual.
For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that.

Your gamepad will still connect without problems,

At least I tested it in my assembly and it works great

These bytes after their replacement turn out to be meaningless, of course you can leave zeros, but they will not affect anything in the future, including compatibility, except perhaps visual. For the emulator, this number becomes just a string variable, and then it is simply placed in the list for display in the menu. At least I am currently working on the controller menu and it seems to work exactly like that. Your gamepad will still connect without problems, At least I tested it in my assembly and it works great
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:22:41 +00:00 (Migrated from github.com)
Review

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object...

This is an extract of SDL database commonly used :
image

Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead).

So usually i stick more to the use of what is commonly used, just look at other emulators:
image
image

My recommandation is usually to stick to the standard provided by the library, but i agree that here whatever will work, as it's part of the object... This is an extract of SDL database commonly used : ![image](https://github.com/user-attachments/assets/536c1162-e179-496b-a908-c771b66b984f) Also native methods used in SDL2 library can return the sdl string without CRC16 (0000 instead). So usually i stick more to the use of what is commonly used, just look at other emulators: ![image](https://github.com/user-attachments/assets/c26b4350-ca80-4349-9301-b9ca715cb471) ![image](https://github.com/user-attachments/assets/914539fa-97ff-441f-8cba-e90d729c4c57)
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Tartifless commented 2025-03-06 10:36:15 +00:00 (Migrated from github.com)
Review

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent.
We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way.

I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.

All in all it works, of course people having saved profiles would need to recreate them once, but that's really not an issue versus the issues that XBOX controllers not saving represent. We could even provide a tool that would automatically go through the profile files and edit the guids to fix this and make profiles compatible without having to recreate them, i highly doubt a huge lot of people actually use profiles in an extensive way. I've tested with approx 16 controller models (from PS4, dualsense, switch pro, many 8BitDo and Xbox models), and as you already noticed, there is no impact in compatibility of these.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Goodfeat commented 2025-03-06 10:36:31 +00:00 (Migrated from github.com)
Review

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.

I understand everything. I definitely like that it works and the solution turned out to be simpler than I thought.
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Tartifless commented 2025-03-06 11:30:53 +00:00 (Migrated from github.com)
Review

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version...

But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy".

I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).

Basically, when working with sdl and controllers, first hint will always be the guid, these guys change the way to calculate these crc bytes so often amd with each version that it became a mess, to cover each cases one would need a folder with 8 dll and dynamically retrieve each guid from each version... But originally we should blame the manufacturers that build controllers and use vid/pid from standard manufacturers instead of their own, especially when they use different button layout than the controller they "copy". I did not look yet at sdl3, that will be a whole new story (for better or worse but I hope for better).
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Goodfeat commented 2025-03-06 11:47:29 +00:00 (Migrated from github.com)
Review

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem

your solution is good, but there is another problem that unfortunately neither sdl2 nor sdl3 will solve, it is the confusion of two absolutely identical controllers. For the correct detection of such devices, the port number to which they are connected is needed. I looked at sdl3, It is impossible to get the USB port number through these libraries. But this is a completely different problem
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...
Tartifless commented 2025-03-06 12:11:48 +00:00 (Migrated from github.com)
Review

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers.
Normally the enumeration order of controllers is the same, as it's based on the device path...

And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...

I don't think this is a problem, ryujinx adds an index before the guid that increments for identical controllers. Normally the enumeration order of controllers is the same, as it's based on the device path... And worst case scenario, someone has 2 identical controllers connected, there would be no issues just picking up the correct one...