GithubHelp home page GithubHelp logo

Comments (5)

sumibi-yakitori avatar sumibi-yakitori commented on June 10, 2024 1

I was able to confirm that setting the hint flag also circumvents this problem.

But I see, the means you showed is better without the hassle of matching the library version 👍

from tetra.

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024 1

SDL 2.0.18 is out, so this should be fixed now 🎉

from tetra.

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024

@sumibi-yakitori: Migrating to an issue for any further updates, bit easier for me to read :)

If you set the SDL_JOYSTICK_HIDAPI environment variable to 0 and run with 2.0.16, do you still see the issue? People on the SDL2 GitHub are suggesting that the issue may be due to SDL interacting with a HID device that SDL sees as a joystick, but MacOS sees as a keyboard.

from tetra.

sumibi-yakitori avatar sumibi-yakitori commented on June 10, 2024

@17cupsofcoffee
Thanks for taking the time to let me know! However, I'm beginning to think I don't want to waste too much of your time.

sdl2::hint::set("SDL_JOYSTICK_HIDAPI", "0");

For now, I think I'll just embed this code in my applications.

from tetra.

17cupsofcoffee avatar 17cupsofcoffee commented on June 10, 2024

I definitely don't consider it a waste of time - this seems like an issue that might have gone unnoticed if you hadn't reported it, so you've probably helped out a load of other SDL2 Mac devs in the process :)

I'm not 100% sure if that code will work, as SDL_JOYSTICK_HIDAPI is an environment variable rather than an SDL hint (if i'm wrong and it does work for you, ignore me 😅). What may work, though, is adding:

std::env::set_var("SDL_JOYSTICK_HIDAPI", "0");

Which also avoids you needing to keep a sdl2 dependency in sync with mine :)

from tetra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.