*** ISSUE RESOLVED ***
Hi all,
I've been away from AppGameKit for several months. Now I've got an updated Ubuntu and the latest version of AppGameKit (via Steam) and I've returned to work on my game... only to find the joypad buttons are not responding, rendering the game totally unplayable. Is anyone else experiencing such issues? This all worked perfectly on a previous release, with the same hardware. My rig plays games (Steam, emulators) without problems.
Before I bug TGC about it, I thought I'd ask the community. Any help/ideas would be appreciated!
DETAILS:
AGK v2.0.21 running on 64-bit Ubuntu 16.04LTS, with X-box controller.
Analogue sticks, Dpad and triggers respond as expected (including pressing the sticks as buttons).
All other buttons appear dead.
Even this simple script fails:
// Project: Gamepad Test
// Created: 2016-11-04
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "GAMEPAD TEST APP" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
do
Print( ScreenFPS() )
` find out which joysticks have been detected
if GetRawJoystickExists(1)<>0
print("Controller exists")
endif
` find out which of those are connected
if GetRawJoystickConnected(1)<>0
print("Controller connected")
endif
` print the details of joystick 1 if it exists
if GetRawJoystickExists(1)
` left analog stick
Print( "X1: " + str(GetRawJoystickX(1)) )
Print( "Y1: " + str(GetRawJoystickY(1)) )
` left trigger
Print( "LEFT TRIGGER: " + str(GetRawJoystickZ(1)) )
` right analog stick
Print( "X2: " + str(GetRawJoystickRX(1)) )
Print( "Y2: " + str(GetRawJoystickRY(1)) )
` right trigger
Print( "RIGHT TRIGGER: " + str(GetRawJoystickRZ(1)) )
` PRIMARY BUTTONS
if GetRawJoystickButtonState( 1, 1 ) <>0
Print( "A green" )
endIf
if GetRawJoystickButtonState( 1, 2 ) <>0
Print( "B red" )
endIf
if GetRawJoystickButtonState( 1, 3 ) <>0
Print( "X blue" )
endIf
if GetRawJoystickButtonState( 1, 4 ) <>0
Print( "Y yellow" )
endIf
` BUMPERS
if GetRawJoystickButtonState( 1, 5 ) <>0
Print( "Left bumper" )
endIf
if GetRawJoystickButtonState( 1, 6 ) <>0
Print( "Right bumper" )
endIf
` START & SELECT
if GetRawJoystickButtonState( 1, 7 )<>0
Print( "<SELECT" )
endIf
if GetRawJoystickButtonState( 1, 8 ) <>0
Print( "START>" )
endIf
` CLICK STICKS
if GetRawJoystickButtonState( 1, 9 ) <>0
Print( "LEFT STICK CLICK" )
endIf
if GetRawJoystickButtonState( 1, 10 ) <>0
Print( "RIGHT STICK CLICK" )
endIf
` CROSS PAD
if GetRawJoystickButtonState( 1, 13 ) <>0
Print( "+LEFT" )
endIf
if GetRawJoystickButtonState( 1, 14 ) <>0
Print( "+UP" )
endIf
if GetRawJoystickButtonState( 1, 15 ) <>0
Print( "+RIGHT" )
endIf
if GetRawJoystickButtonState( 1, 16 ) <>0
Print( "+DOWN" )
endIf
endif
Sync()
loop
NB: There is no difference whether using GetRawJoystickButtonState, GetRawJoystickButtonPressed or GetRawJoystickButtonReleased.
The first button pressed registers briefly as "(B) Red", regardless of which button is actually pushed, and then no further pushes are registered.
No errors or debug info displayed.
AGK Linux user.