我有一個奇怪的問題pygame,我沒有連接到我的筆記本電腦的操縱桿,但返回1它甚至檢測到軸輸入。連接到我的電腦的設(shè)備是:鼠標、鍵盤和 wacom 影拓。pygame.joystick.get_count()未連接其他 USB 設(shè)備。編輯:我做了以下測試腳本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())當我按下影拓數(shù)位板上的按鈕時,它會注冊為操縱桿按鈕按下。我是否必須斷開平板電腦的連接才能正常工作?
添加回答
舉報
0/150
提交
取消