SDL 2 & Games Controllers
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 197 from 2008/7/10
    From: Cheshire, UK
    This is probably a really stupid question, but how do you get SDL2 games to work with a games controller.

    In particular I am trying to get ZGloom to use my games controller but even though the gamecontroller test within the SDL2 distribution recognises the controller I just can't get it to work with ZGloom.

    What am I doing wrong?
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 09:23
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 608 from 2010/2/10
    From: FRANCE
    Hi

    You test your game controller with testgamecontroller program (in SDL2 archives) ?

    What is model of your controller ?
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »10.09.21 - 11:57
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 197 from 2008/7/10
    From: Cheshire, UK
    Quote:

    beworld wrote:
    Hi

    You test your game controller with testgamecontroller program (in SDL2 archives) ?

    What is model of your controller ?




    Yes - I have tested it with the testgamecontroller program in the SDL2 archive and it gets picked up fine.

    The controller I am using is this one;

    Morphos-Store

    It can be used as either X-Box 360 controller or a HID controller.

    [ Edited by Zetec-s 10.09.2021 - 14:21 ]
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 13:20
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 608 from 2010/2/10
    From: FRANCE
    ok so on testgamecontroller, you see : "XBox 360 Controller" (1 game controller attached)
    if yes, normally you can use your controller with ZGloom...

    On ZGloom's menu, you can use PAD to choose option and 2 STICKs and 1 button to play on game.
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »10.09.21 - 15:00
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 197 from 2008/7/10
    From: Cheshire, UK
    Quote:

    beworld wrote:
    ok so on testgamecontroller, you see : "XBox 360 Controller" (1 game controller attached)
    if yes, normally you can use your controller with ZGloom...

    On ZGloom's menu, you can use PAD to choose option and 2 STICKs and 1 button to play on game.






    Sorry for appearing stupid but where is that menu, as I cannot find it?

    If I go into Gloom Deluxe for example I don't have the option to use PAD.
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 17:18
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 197 from 2008/7/10
    From: Cheshire, UK
    Quote:

    Zetec-s wrote:
    Quote:

    beworld wrote:
    ok so on testgamecontroller, you see : "XBox 360 Controller" (1 game controller attached)
    if yes, normally you can use your controller with ZGloom...

    On ZGloom's menu, you can use PAD to choose option and 2 STICKs and 1 button to play on game.






    Sorry for appearing stupid but where is that menu, as I cannot find it?

    If I go into Gloom Deluxe for example I don't have the option to use PAD.




    Sorry I’ve realised you mean it should just let me use the game pad on the menus and the dual sticks in the game but it doesn’t.

    Have I not got SDL2 set up correctly?

    The same happens on my PowerBook and my G5.
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 21:10
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 608 from 2010/2/10
    From: FRANCE
    mmmm

    To be sur, reinstall SDL2.0.14 (last package)

    And retest.

    Next, try to remap your controller, use controllermap program
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »11.09.21 - 07:50
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 197 from 2008/7/10
    From: Cheshire, UK
    All fixed!

    Turns out the gamecontrollerdb.txt file was not being copied into either ENV: or Envarc.

    I manually copied it over and now everything is fine.

    Looked at the installer log file and they should have copied across but for some reason didn't.

    Thanks for your help.
    PowerMac G5 Quad 2.5Ghz/2GB MorphOS 3.18 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.18 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.18 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »11.09.21 - 23:40
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 608 from 2010/2/10
    From: FRANCE
    ok, thanks for feedback.
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »12.09.21 - 09:59
    Profile Visit Website