-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SDL for joypad input on Linux #25
Conversation
SDL is loaded in the same way other Linux system libraries are loaded by using a wrapped and dlopen. Optionally, SDL can be dynamically linked into the binary. Currently for Linux only since that platform direly needs it, but should be easy to make work on Windows once stable. Proposal at: godotengine/godot-proposals#9000
I think this is more than this proposal - my opinion switch to SDL in core as input and window manager. Maybe not now, but i think we can make discussion on this. |
As a Linux user, I strongly second this. SDL is basically the de-facto standard when handling gamepad in Linux. And currently the Godot implementation is not that reliable. I don't remember how many times I had to restart Godot and pray it detect my gamepad while other games using SDL had no problem at all. I don't mind if the executable file will increase a few megabytes, it's not big deal for me IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing from a phone is headache inducing. I just looked the Python, which is about the maximum effort I could stomach in a phone
|
||
Import("env") | ||
|
||
if "sdl" in env and env["sdl"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My read on sccon environments and a quick check of its usage in the project says that the falsy check is unneeded, so this could just be
But I'd like someone who actually uses sccon more than me to verify this
if "sdl" in env and env["sdl"]: | |
if "sdl" in env: |
/* joypad_sdl.cpp */ | ||
/**************************************************************************/ | ||
/* This file is part of: */ | ||
/* GODOT ENGINE */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we changing references to Godot in new code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a PR that updates the copyright disclaimer script. That probably should be executed by maintainers at some point. Also, this PR has been rescued from Godot purgatory, it seems.
Huh, the ticket got closed? |
SDL is loaded in the same way other Linux system libraries are loaded by using a wrapped and dlopen.
Optionally, SDL can be dynamically linked into the binary.
Currently for Linux only since that platform direly needs it, but should be easy to make work on Windows once stable.
Proposal at: godotengine/godot-proposals#9000
P.S: I've made sure to strip the files as much as possible, but unless you want to be pulling your hair out by stripping files individually this is the best we can do IMO.