Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Godot] Input.joy_connection_changed bug on disconnect joypad (no signal emit)

クローズ
#192 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
cpp, godot
領域
game-dev

調査の方向性

Start by tracing the joy_connection_changed signal and get_connected_joypads() implementation; the issue does not name source files or tests. Reproduce the reported two-joypad disconnect order on Windows 10 with Godot v4.3. Done means disconnecting device0 before device1 emits the disconnection signals and leaves the connected-joypad list empty.

索引モデルが issue の本文から書いたものです。

説明

bug topic:input tracked:godot
Tested versions

v4.3.stable.official

System information

Windows 10, v4.3.stable.official [77dcf97], Vulkan

Issue description

When connecting and disconnecting joypads, information is transmitted via a signal to some function and the Array Input.get_connected_joypads() is also formed.
When 2 joypads are connected in series (!), each one triggers the signal connected = true.

When disconnecting joypads in series (!), the return signal disconnected = true does not trigger, if the first joypad#1 on device0 was disconnected first.
Thus, Joypad#2 on device1 remains in Input.get_connected_joypads(), while all joypads are disconnected.

The description says that the signal is emitted every time a connection or disconnection occurs, which does not happen.

Steps to reproduce
  1. Create a simple 2D scene.
  2. Attach a script with the code:
extends Node2D

func _ready() -> void:
	Input.joy_connection_changed.connect(_on_joy_connection_changed)

func _on_joy_connection_changed(device: int, connected: bool):
	if connected:
		prints("Joypad Array", Input.get_connected_joypads())
	else:
		prints("Joypad Array", Input.get_connected_joypads())
  1. Run the scene and start connecting joypads

  2. Then when we see Joypad Array [0, 1] in the console:

    a) Disconnect in reverse order - joypad#2, then joypad#1. Everything works, Joypad Array [] all joypads are excluded.

    b) Connect back, first joypad#1 then joypad#2. After that, first disconnect joypad#1 (device0) then disconnect joypad#2 (device1). Joypad Array [1] all joypads are excluded. The list of joypads should be Joypad Array [].

    If after this you connect any joypad that gets to device0, then the disconnected = true signal is triggered and immediately connected = true is triggered. The list of devices becomes Joypad Array [0].

Minimal reproduction project (MRP)

Input bug Project.zip

主要言語
C++
スター
6.1k
フォーク
337
平均マージ
4日 16時間
マージ済み PR(30日)
53

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Redot-Engine/redot-engine のほかの issue

Redot-Engine/redot-engine の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。