1. Hey! Guest! The 35th GMC Jam will take place between November 28th, 12:00 UTC - December 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

SDL Joystick functions on Mac

Discussion in 'Advanced Programming Discussion' started by Samuel Venable, Dec 26, 2018.

  1. Samuel Venable

    Samuel Venable Time Killer

    Joined:
    Sep 13, 2016
    Posts:
    1,291
    Anyone know how to properly include a Mac OS X *.framework folder in an extension? I need a folder named "SDL2.framework" to be included with the extension for SDL joystick functions to be recognized, but there are several problems:

    1) There is no "import folder" option in GameMaker extensions.

    2) you can import the folder's contents into Included Files by importing the files and creating groups for the folders, but this puts them in the wrong Mac bundle directory: Resources. It should be in Frameworks.

    3) putting the framework under included files also renames the folder to not have a period in the file name when the folder is imported from the Marketplace, making the framework no longer recognized as a framework by the OS.

    4) putting it under included files also renames SDL2.framework to all lower case on test runs, debug, and compile mode. This prevents my dylib from being able to find "SDL.framework" because on Mac it is common knowledge that files and paths are case sensitive and yes that does matter. Same for Linux but that's another complaint for a different time. Spaces in filenames would also be cool but YoYo doesn't know how to use spaces when programming apparently. Thats another tangeant i'll mention in more detail for a different thread.

    5) for the joystick functions I wrote to work, I need a way to grant the app permission to handle input from USB and Bluetooth devices. This to my knowledge is virtually impossible. Everything concerning that seems to be limited to working with YoYo's built-in gamepad_* functions that is provided by a closed source dylib they created. I have no idea how to grant that same access to my dylib.

    In case you are wondering, I wrote an extension that is a compatibility layer for GM 8.1 and below's joystick functions, but written to work in a cross-platform manner for GMStudio 1.4 and 2, without being Windows-only like Studio's built-in functions and like GameMaker for Windows, and without being Mac-only like GameMaker 7 for Mac. So yeah, i have my Windows and Linux code working. I bought the mobile license recently, so maybe even an Android and iOS port... but until these things get fixed, I definitely can't do Mac or even iOS for a lot of the same reasons...
     
    Last edited: Dec 26, 2018
  2. EvanSki

    EvanSki King of Raccoons

    Joined:
    Apr 17, 2018
    Posts:
    580
    Import them as included files
    Then have GM make the folder and shove the files in it

    You could also try autoHotkey depending on how you want to do it
     
  3. Samuel Venable

    Samuel Venable Time Killer

    Joined:
    Sep 13, 2016
    Posts:
    1,291
    I've addressed in the OP why this doesn't work on mac and linux.
     
    EvanSki likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice