Skip to content
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

CMake: Enable SDL by default on macOS. #8406

Merged
merged 1 commit into from Oct 16, 2019

Conversation

jordan-woyak
Copy link
Member

https://bugs.dolphin-emu.org/issues/11741 (and probably others)

Our IOKit code has problems with many controllers.
SDL seems to have fewer problems.

Let's see if our macOS buildbot can handle enabling SDL by default.

@underdiskdev
Copy link

I'm underdisk. I made an error on the bug website so I repeat it here (we never know). With the Switch Pro Controller on macOS, using SDL fixed the problems! Big yes.

@spycrab
Copy link
Contributor

spycrab commented Oct 15, 2019

Are we sure we don't want to fix our IOKit backend instead?

@jordan-woyak
Copy link
Member Author

@spycrab I've seen so many reports of non-working controllers in Dolphin on macOS since I've been involved with the project. Things go unreported or stay broken for months, years, or they never get fixed. Once in a while someone will come around and fix up our macOS input backend a bit but we never have consistent people to work on any macOS-specific code. Even if you, or anyone, fixes up our IOKit code, I think it's silly to imagine it's going to have compatibility on par with SDL. We aren't going to get the level of testing that SDL has. Even if we did have people and testing to get our IOKit backend to a capable level why waste the time when SDL already exists? Why try to maintain more macOS-specific code when a ubiquitous library like SDL already works?

TLDR: Enable SDL (which uses IOKit). Kill our IOKit code. Eliminate 700 lines of macOS-specific code that we struggle to maintain. Profit.

@spycrab
Copy link
Contributor

spycrab commented Oct 16, 2019

By that logic we could just replace all of our input backends with SDL.

@JMC47
Copy link
Contributor

JMC47 commented Oct 16, 2019

We have people who maintain Linux and Windows consistently. macOS we do not and even the developers that do care if macOS works correctly are tired of all the separate problems it has.

SDL on Windows was causing crashes, which is why it was outright disabled there.

@phire
Copy link
Member

phire commented Oct 16, 2019

Was causing crashes on linux too, which is why it was disabled there.
It's fixed now, as long as the user is running a new-enough distro.

It could be smart to standardise on SDL 2.0 for all operating systems, but it would require porting any extra features we need into SDL, which would probably require us to ship a custom version of SDL in externals, and take measures on linux to prevent distro-maintainers ripping our custom SDL out and using the distro packaged version of SDL.

@underdiskdev
Copy link

Any example of such "extra features" ? (I'm not a dolphin dev)

@jordan-woyak
Copy link
Member Author

SDL isn't flawless (re: crashes) which is why I don't think we should solely rely on it for input on all platforms. I can't think of "extra features" we'd NEED that SDL doesn't provide but one problem is "nice" naming of axes. SDL has only axis numbers for generic "joysticks" so we'd lose all of our "Axis X"-type names (which would break existing configs on Windows). "Custom SDL" would be silly as that would be exactly the same as what we are doing now (maintaining three sets of OS-specific code) only much code and in an unfamiliar codebase all written in pure C.

If someone wants to fix our IOKit code, go ahead. In the meantime why not enable SDL on macOS so things work?

@Helios747
Copy link
Contributor

It would be ideal to fix our IOKit backend, but it's clear we don't have anybody that gives a shit about MacOS and hoping that somebody shows up to give one has proven to not be very effective. So I'll pick a revertable 2 LOC PR as a solution here.

@Helios747 Helios747 merged commit 4b1567c into dolphin-emu:master Oct 16, 2019
@jordan-woyak jordan-woyak deleted the macos-enable-sdl branch October 16, 2019 23:35
@underdiskdev
Copy link

macOS guy here, I still encounter the problem using 5.0-10993. No SDL interface appear in the device list, but personal build using -DENABLE_SDL=1 does work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants