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

Two Linux Fixes #5

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Two Linux Fixes #5

merged 3 commits into from
Apr 25, 2024

Conversation

madame-rachelle
Copy link
Contributor

No description provided.

@madame-rachelle madame-rachelle changed the title - don't fatal error out on SDL_WaitEvent fails Two Linux Fixes Apr 25, 2024
@dpjudas
Copy link
Owner

dpjudas commented Apr 25, 2024

There's a couple of issues with this fix.

First, why does SDL_GetEvent randomly fail on Linux? Lets just for the sake of the argument say that SDL and Linux sucks and this is just what sucky stuff does, this leads us to the bigger problems:

  1. If the call fails it still calls DispatchMessage. This means it sends an uninitialized SDLEvent to the message handler function which then might do random stuff.

  2. What if it keeps failing? We will have a busy loop now. I guess we can just ignore this one and say hey if Linux is going to randomly fail pumping events then its also fair to say it Linux should randomly hang apps too, because Linux is Linux.

  3. I know its a long tradition to write random error messages to the console on Linux (I'm looking at you Qt!), but I don't think we should do this. :) If it is an acceptable behavior that SDL_GetEvent fails the events then it shouldn't write anything about it. (remove the print statement)

Sorry for sounding a bit grumpy about this one, since I do appreciate making the PR. It is just that we need to remove the print statement and not call DispatchMessage before this can be merged. As for the busy loop, I guess that's just something that has to happen on Linux now that we can't rely on SDL being better than it is. My OCD demanded that I had to curse about this becaue every project I have on github always have people wanting me to move everything to SDL as if its this divine piece of quality software and here we are with it not even being able to pump messages (insert image of old man yelling at cloud here).

@dpjudas dpjudas merged commit f8b1271 into dpjudas:master Apr 25, 2024
2 checks passed
@coelckers
Copy link
Contributor

SDL is not a quality piece of software. And neither is Linux. I find it very telling that far, far more than 50% of our tech issues are on Linux. Who knows what really happens on the system where SDL_WaitEvent fails. I wouldn't be surprised if some weird shit software was installed that destabilizes the entire system,

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

Successfully merging this pull request may close these issues.

3 participants