我有一個(gè)奇怪的問(wèn)題pygame,我沒(méi)有連接到我的筆記本電腦的操縱桿,但返回1它甚至檢測(cè)到軸輸入。連接到我的電腦的設(shè)備是:鼠標(biāo)、鍵盤(pán)和 wacom 影拓。pygame.joystick.get_count()未連接其他 USB 設(shè)備。編輯:我做了以下測(cè)試腳本import pygamepygame.init()pygame.joystick.init()print("joystick count:",pygame.joystick.get_count())gJoystick = pygame.joystick.Joystick(0)gJoystick.init()print(gJoystick.get_init())fGetEvent = Truewhile fGetEvent: for event in pygame.event.get(): if event.type == pygame.JOYBUTTONDOWN: print("joystick button pressed") fGetEvent = FalsegJoystick.init()print(gJoystick.get_numaxes())當(dāng)我按下影拓?cái)?shù)位板上的按鈕時(shí),它會(huì)注冊(cè)為操縱桿按鈕按下。我是否必須斷開(kāi)平板電腦的連接才能正常工作?
Pygame錯(cuò)誤地檢測(cè)到不存在的操縱桿
繁華開(kāi)滿(mǎn)天機(jī)
2022-08-25 13:42:59