Re: Is it forbidden to run SDL apps from X11 on the Pi?
Andreas Falkenhahn <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
On 14.09.2016 at 16:16 Gabriel Jacobo wrote: > I made the RPi backend, it's designed to run without X11, since X11 > consumes resources which were scarse on the original hardware, and > working under the assumption that given SDL already supports X11 if > you wanted to run apps under X11 you could just use the X11 video > backend (which in practice may or may not work, I've never tried). Well, it'll probably only work with the software renderer which is most likely too slow on the Pi. That's why your backend is the only really useful one because it supports GPU acceleration. > The RPi backend accesses the hardware drivers and kernel services > directly, so I never expected it to play well with another app that > does the same thing (namely, X11). Good to know. Still, I'm wondering why you didn't mention this in the README? I mean, 99.9% of the users will want to run SDL on X11 I'd estimate. And this can potentially be fatal because the X11 desktop lives on underneath SDL's framebuffer and it will receive every input event originally designated for SDL. > Is it impossible to achieve? No > idea. If you care about this, I encourage you to try it out, > document what you find out and submit a patch for the README so the > community can benefit from your experience. Well, I don't know anything at all about programming the hardware drivers and kernel services of the Pi directly so it's hard for me to tell which potential issues could arise from using X11 and your backend at the same time. I think you should be in a much better position to judge this because you wrote it :) However, if the only real issue is the problem that X11 lives on underneath the SDL display, I think this could be solved by opening a fullscreen X11 shielding window which simply makes it impossible to access the X11 desktop below. Then you'd have the following setup: a) Framebuffer managed by RPI backend --> on top of --> b) fullscreen SDL shielding window (using _NET_WM_STATE_FULLSCREEN) to make sure no input ever reaches the X11 desktop --> on top of --> c) X11 desktop This could solve the problem of input events designated for SDL to reach the X11 desktop but I'm not sure whether there are any other issues. Currently, I haven't found any and it works quite nicely on top of X11 but as I said, I don't know what's going on under the hood, that's where you're the expert here :) -- Best regards, Andreas Falkenhahn mailto:[email protected]