Page 1 of 1
Different Controller GUID for different LOVE versions?
Posted: Sun Jan 19, 2020 4:01 am
by dizzykiwi3
Hey all!
A game I built a few years back in LOVE 10.2 prints out a controller's GUID as
7e050000000000000620000000000000
However, when I run the same game in LOVE 11, it prints out the GUID of
030000007e0500000620000001000000
which matches what I get from the SDL2 Gamepad tool.
Does anyone know why this might be and what I can do to fix this?
Re: Different Controller GUID for different LOVE versions?
Posted: Sun Jan 19, 2020 9:33 am
by raidho36
GUID is not guaranteed to be consistent, just unique. To fix this you can use USB VID/PID values instead, those are baked into the controller. You can also controllers' name string, with a caveat that off brand controllers can share their generic names.
Re: Different Controller GUID for different LOVE versions?
Posted: Mon Jan 20, 2020 5:32 am
by dizzykiwi3
According to the wiki, Joystick:getGUID "gets a stable GUID unique to the type of the physical joystick which does not change over time. For example, all Sony Dualshock 3 controllers in OS X have the same GUID. The value is platform-dependent."
https://love2d.org/wiki/Joystick:getGUID
I think the issue may be due to a change in SDL versions between the LOVE versions...?
Re: Different Controller GUID for different LOVE versions?
Posted: Mon Jan 20, 2020 9:49 am
by raidho36
Well it says it right there - it's platform-dependent. Meaning that any hardware or software configuration change can affect this. It's probably unaffected by most things but that still leaves room for random differences. All GUIDs should remain the same provided the platform remains the same, and you have different SDL versions.
Re: Different Controller GUID for different LOVE versions?
Posted: Sat May 23, 2020 6:26 pm
by D0NM
In LOVE 0.10 was used older version of the SDL gamepads DB.
(which is not supported by that open source gamepads DB)
In LOVE2D 11.x is used this one 'Game Controller DB for SDL in 2.0.10 format'
https://github.com/gabomdq/SDL_GameControllerDB
The GUIDS were changed. Even some buttons mappings were changed (on my Gamepad) due to the coinciding GUIDS of the OEM products that were released by such brands as SVEN, GemBird, etc. They look the same, they have the same inner stuff but some buttons are swapped. And you cannot help yerself here.
We are adding REDEFINE CONTROLS option that should fix all the players' issues.
PS Be sure that your game doesn't crash on unplugging a gamepad and on plugging in some more gamepads during the game.
There are funny things when u use 2+ gamepads of the same manufacturer.