Merge pull request #115218 from Nintorch/fix-joy-info-raw-name-utf8

Fix incorrect reading of joypad UTF8 `raw_name` in `Input.get_joy_info()`
This commit is contained in:
Thaddeus Crews 2026-01-27 09:04:16 -06:00
commit b40f4ae52f
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -175,7 +175,7 @@ void JoypadSDL::process_events() {
Dictionary joypad_info;
// Skip Godot's mapping system if SDL already handles the joypad's mapping.
joypad_info["mapping_handled"] = SDL_IsGamepad(sdl_event.jdevice.which);
joypad_info["raw_name"] = String(SDL_GetJoystickName(joy));
joypad_info["raw_name"] = String::utf8(SDL_GetJoystickName(joy));
joypad_info["vendor_id"] = itos(SDL_GetJoystickVendor(joy));
joypad_info["product_id"] = itos(SDL_GetJoystickProduct(joy));