Recent Raspberry Pi firmware images have renamed the vendor graphics
libraries (brcmEGL, brcmGLESv2, brcmOpenVG) to distinguish from the
standard VC4 Mesa driver.
* When videocore is selected, first try to use pkgconfig for the
new library names (brcmEGL, brcmGLESv2, brcmOpenVG).
* Ensure that non-pkgconfig fallback detection also checks the new
library names.
This should resolve compile issues in stretch whilst maintaining
compatibility with jessie firmwares later than 1.20160921-1 (the
first package that includes the renamed libraries).
The PKG_CONFIG_PATH must be set in your build environment in order
for the pkgconfig to be utilized, which will be included in
the next firmware (1.20170811-2 or later).
Adding NAT traveral interface to libretro-common, with (currently) a
backend support MiniUPNPC. Sensible future backends would be libupnp and
a direct implementation of PCP/NAT-PMP.
One some systems (tested with Gnome 3 on Arch Linux) the current method
of using `xdg-screensaver` to suspend the screensaver does not work.
Instead, using DBus to issue an `Inhibit` request is recommended.
The request returns a cookie that needs to be re-used to un-inhibit the
screensaver later. Additionally if the DBus connection is closed the
current inhibition is discarded. Thus, the DBus connection needs to stay
connected for the duration of the screenshot inhibition.
The code is heavily inspired from the [SDL 2.x
code](http://hg.libsdl.org/SDL/file/default/src/core/linux/SDL_dbus.c#l172).
I didn't call the SDL 2 code though since this it to fix the issue with
the GL driver, and I assume one would want to have screensaver inhibited
even when SDL 2 is not available (but GL is).
I've set "WIP" because:
* I haven't done C in a long time so my code is probably not great
* There's a dependency on DBus which I don't know is acceptable or
not
* I've put my code where I could to check it works, but `x11_common` may
not be the best place
* The code need and "init" and "deinit" kind of method as it needs to
initialise the DBus connection, and on deinit close it properly. I've
used `x11_connect` and `x11_window_destroy` but they don't sound like
the best choices.
* I'm a bit unclear as to what happens when "suspend screensaver" is
ticked on/off in the menu. This doesn't seem to call
`x11_suspend_screensaver` everytime, so I'm not sure if there's a hook
somewhere (as disabling screensaver suspend in the menu should cause a
DBus unhinibit request to be sent).
* Should I just call the SDL 2.x code (meaning that the GL driver would
depend on SDL 2.x at runtime)?
So, first of all are you ok with the approach, and if yes I'd gladly get
feedback about the code, how to architecture it and the best place to
put it.
Thanks!