Coder Social home page Coder Social logo

Comments (10)

daid avatar daid commented on July 24, 2024

Odd and interesting. It might have something to do with startup order? Maybe X is started this way before joystick drivers are loaded?

I didn't know X could auto start like that. Any idea how that works? Is it something that systemd does? Or SDL2?

from emptyepsilon.

fiskn avatar fiskn commented on July 24, 2024

I'm not 100% sure at the moment what is happening, I can see in the EE startup logs that the joystick is detected, just that the events are not captured either in game or on the hot key binding screen.

After doing lots of searching the only thing I could see that might have been related was that by default SDL won't capture joystick events, so wasn't sure if the way X was starting meant the EE "window" was not in focus, or something odd like that.

It was purely by accident that I noticed I could launch EE without starting X, as I was trying to view the EE startup logs from a remote SSH session and when I ran the binary, the local screen suddenly loaded up EE and the joystick was working. I then tried running the startx cmd from the same SSH session and the joystick was not working again.

from emptyepsilon.

daid avatar daid commented on July 24, 2024

Oh, I think I know how X11 auto starts. That is most likely systemd socket activation magic.

I am confused about the joysticks, I thought SDL2 just goes to the input event system of linux for that.

from emptyepsilon.

fiskn avatar fiskn commented on July 24, 2024

I think this was the thread that made me think it was a focus issue:
libsdl-org/SDL#1393

No idea if it is a focus issue, but it seemed to be a likely reason. Although no idea what not running with startx allows it to work. Also mouse and keyboard are fine, which confuses matters.

from emptyepsilon.

daid avatar daid commented on July 24, 2024

That mentions pretty old SDL2 versions, I don't think the netboot is on a version that old (even if it is on old stuff)

from emptyepsilon.

fiskn avatar fiskn commented on July 24, 2024

Sorry, should have been more clear, I didn't necessarily think the bug was the issue, but that maybe there was some confusion about window focus, effectively there being no window manager involved. And also if the SDL hint for background joystick events were of any use

I might try rebuilding SP with the hint for background joystick events:
https://wiki.libsdl.org/SDL2/SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS

from emptyepsilon.

gwaland avatar gwaland commented on July 24, 2024

I wonder if this is related to the issue I was having with my touch screens. Just for laughs you might try starting icewm and then starting empty epsilon and see if the issue is still there when there's a window manager present.

I'll try your fix in my configuration soon since I have another game this saturday.

from emptyepsilon.

fiskn avatar fiskn commented on July 24, 2024

So it looks like when I'm directly running the EE binary X isn't actually in use, at least I can't see it running anywhere, not sure if SDL is using its KMS direct screen driver.

Anyway, this doesn't really matter anymore as after I re-compiled SeriousProton including the SDL hint for background joystick events, it seems to have fixed the problem when running under X.

from emptyepsilon.

daid avatar daid commented on July 24, 2024

Oh, I tought the KMS driver was not enabled by default in SDL2. That might actually give slightly better performance then with X11.

from emptyepsilon.

fiskn avatar fiskn commented on July 24, 2024

Oh, I tought the KMS driver was not enabled by default in SDL2. That might actually give slightly better performance then with X11.

It possibly does, but I spent several hours trying to work out how to calibrate a touchscreen when not running under X and then gave up.

Would you like a PR for the SDL hint?

from emptyepsilon.

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.