Comments (5)
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.
SDL 2.0.18 is out, so this should be fixed now 🎉
from tetra.
@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.
@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.
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)
- Make enums non_exhaustive if they are likely to be extended HOT 1
- crash with "Segmentation fault: 11" message when multiple gamepads connected. HOT 13
- Improve performance docs
- Include inner error when printing `TetraError::PlatformError` HOT 1
- Switch to SDL_GameControllerRumble for gamepad rumble
- Setting the swap interval at startup fails on some platforms HOT 4
- Tetra fails to build with edition = "2021" or resolver = "2" HOT 2
- Tetra 0.7 HOT 4
- Add an option to generate premultiplied font atlases HOT 3
- The moethods Shader::from_vertex_string and Shader::from_fragment_string won't build
- tetra on Windows selects an integrated GPU when a discrete GPU is available HOT 1
- Mesh non deterministic glitch HOT 2
- Integrate ImGui (imgui-rs) into Tetra as a early GUI solution
- "static-link" doesn't work for "sdl2 0.35.2" on OSX
- Instancing using instanced vertex attributes HOT 3
- Pass DrawParams as a reference to the Texture's draw method
- Window is always fullscreen on Windows HOT 2
- Play sounds has a chance to cause an error on 0.8 HOT 1
- add alignment option for text HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tetra.