Different Controller GUID for different LOVE versions?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
dizzykiwi3
Citizen
Posts: 58
Joined: Tue Jan 14, 2014 2:03 am

Different Controller GUID for different LOVE versions?

Post 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?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Different Controller GUID for different LOVE versions?

Post 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.
User avatar
dizzykiwi3
Citizen
Posts: 58
Joined: Tue Jan 14, 2014 2:03 am

Re: Different Controller GUID for different LOVE versions?

Post 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...?
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Different Controller GUID for different LOVE versions?

Post 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.
User avatar
D0NM
Party member
Posts: 250
Joined: Mon Feb 08, 2016 10:35 am
Location: Zabuyaki
Contact:

Re: Different Controller GUID for different LOVE versions?

Post 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.
Our LÖVE Gamedev blog Zabuyaki (an open source retro beat 'em up game). Twitter: @Zabuyaki.
:joker: LÖVE & Lua Video Lessons in Russian / Видео уроки по LÖVE и Lua :joker:
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 4 guests