godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.04k stars 21.11k forks source link

"parse_mapping: Invalid device entry" on Steam version #77638

Closed Stovehead closed 1 year ago

Stovehead commented 1 year ago

Godot version

v4.0.3.stable.official [5222a99f5]

System information

Issue description

image Whenever I run any project, even empty ones, I get these 4 errors about input mapping. They are as follows:

E 0:00:00:0053 parse_mapping: Invalid device mapping entry "x:" in mapping: 03000000790000004318000000000000,dev:gc:GameCube,platform:Windows,a:b1,b:b2,y:b3,x:,start:b9,guide:,back:,leftstick:,rightstick:b0,leftshoulder:b4,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4, <C++ Error> Condition "output.length() < 1 || input.length() < 2" is true. Continuing. <C++ Source> core/input/input.cpp:1357 @ parse_mapping() E 0:00:00:0053 parse_mapping: Invalid device mapping entry "guide:" in mapping: 03000000790000004318000000000000,dev:gc:GameCube,platform:Windows,a:b1,b:b2,y:b3,x:,start:b9,guide:,back:,leftstick:,rightstick:b0,leftshoulder:b4,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4, <C++ Error> Condition "output.length() < 1 || input.length() < 2" is true. Continuing. <C++ Source> core/input/input.cpp:1357 @ parse_mapping() E 0:00:00:0053 parse_mapping: Invalid device mapping entry "back:" in mapping: 03000000790000004318000000000000,dev:gc:GameCube,platform:Windows,a:b1,b:b2,y:b3,x:,start:b9,guide:,back:,leftstick:,rightstick:b0,leftshoulder:b4,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4, <C++ Error> Condition "output.length() < 1 || input.length() < 2" is true. Continuing. <C++ Source> core/input/input.cpp:1357 @ parse_mapping() E 0:00:00:0053 parse_mapping: Invalid device mapping entry "leftstick:" in mapping: 03000000790000004318000000000000,dev:gc:GameCube,platform:Windows,a:b1,b:b2,y:b3,x:,start:b9,guide:,back:,leftstick:,rightstick:b0,leftshoulder:b4,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a5,righty:a2,lefttrigger:a3,righttrigger:a4, <C++ Error> Condition "output.length() < 1 || input.length() < 2" is true. Continuing. <C++ Source> core/input/input.cpp:1357 @ parse_mapping()

This only happens when I use the Steam version. Using the version downloaded from godotengine.org does not yield this error. I have tried rebooting and reinstalling Godot, neither of which have worked.

Steps to reproduce

  1. Install Godot from Steam
  2. Create a new project
  3. Run the project

Minimal reproduction project

N/A

akien-mga commented 1 year ago

Most likely Steam is injecting those mappings via the SDL_GAMECONTROLLERCONFIG environment variable.

I don't know if they properly respect the spec with those empty guide: etc. Entries, but we can likely skip those and consider that those buttons don't exist for these devices (which is correct).

brno32 commented 1 year ago

Do you mean to just remove this error message and continue instead?

https://github.com/godotengine/godot/blob/master/core/input/input.cpp#L1360