SDL 2 & Games Controllers
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 156 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.15 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.15 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.15 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 10:23
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    beworld
    Posts: 448 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,PowerMac 2.7,PowerBook 1.5
    My MOS ports
  • »10.09.21 - 12:57
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 156 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.15 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.15 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.15 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 14:20
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    beworld
    Posts: 448 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,PowerMac 2.7,PowerBook 1.5
    My MOS ports
  • »10.09.21 - 16:00
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 156 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.15 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.15 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.15 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 18:18
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 156 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.15 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.15 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.15 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »10.09.21 - 22:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    beworld
    Posts: 448 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,PowerMac 2.7,PowerBook 1.5
    My MOS ports
  • »11.09.21 - 08:50
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Zetec-s
    Posts: 156 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.15 Registered
    Powerbook 1.67Ghz/1.5GB MorphOS 3.15 Registered
    MacMini 1.5Ghz/1GB MorphOS 3.15 Registered
    Efika 5200B 400Mhz/128MB MorphOS 2.3 Registered
  • »12.09.21 - 00:40
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    beworld
    Posts: 448 from 2010/2/10
    From: FRANCE
    ok, thanks for feedback.
    IMac G5 2.1,PowerMac 2.7,PowerBook 1.5
    My MOS ports
  • »12.09.21 - 10:59
    Profile Visit Website