5663 Commits

Author SHA1 Message Date
nguillaumin
c69c488fdf Address code review comments 2016-09-09 18:08:54 -07:00
Nicolas Guillaumin
05df632bd8 WIP: Fixes #2026 Screensaver suspend on Linux via Dbus
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!
2016-09-08 15:23:41 -07:00
twinaphex
db6171676a Use retro_assert everywhere 2016-09-08 11:59:44 +02:00
twinaphex
b43f786f89 Cleanups 2016-09-08 08:15:40 +02:00
twinaphex
8a9ae155a2 Cleanups 2016-09-08 08:10:31 +02:00
twinaphex
7a36ea7d1c Silence warnings 2016-09-08 06:11:02 +02:00
Twinaphex
ac2676b25f (glcapabilies.h) Add HAVE_CONFIG_H ifdef 2016-09-08 05:51:20 +02:00
Francisco José García García
04b5dbdb5c (VITA) Silence texture load 2016-09-07 23:53:20 +02:00
Alcaro
37a907eb51 These aren't needed. 2016-09-07 14:40:10 +02:00
Alcaro
3f105fe71f Perform evil experiments (run this driver in a completely different program) 2016-09-07 14:30:27 +02:00
twinaphex
cc6fe3159f Some comments 2016-09-07 14:12:40 +02:00
twinaphex
ab325e54a1 gfx/video_driver.h - add comments 2016-09-07 13:55:46 +02:00
twinaphex
e880a3b248 vfilter is for Wii/Gekko only 2016-09-07 13:54:01 +02:00
Alcaro
e243614db8 Create half-broken XShm driver, to perform evil experiments on 2016-09-07 13:39:00 +02:00
Brad Parker
81090720c8 context must be current, not released, to use GL 2016-09-06 21:47:08 -04:00
mudlord
b1833c2d52 account for if people have core id files but not the actual cores. 2016-09-07 09:44:07 +10:00
twinaphex
245a65a0d7 Change this 2016-09-07 01:12:35 +02:00
twinaphex
642e46779b Cleanups 2016-09-06 23:59:43 +02:00
twinaphex
ffcf96dd24 Add config.h includes 2016-09-06 23:47:05 +02:00
twinaphex
e6a114a95a Create gfx/video_frame.c 2016-09-06 23:41:09 +02:00
twinaphex
50bd1c38be Header cleanup 2016-09-06 23:34:55 +02:00
twinaphex
226460530c Header include cleanup 2016-09-06 23:34:27 +02:00
twinaphex
671063aec2 Silence warnings 2016-09-06 23:17:16 +02:00
dankcushions
cdc4bff3fb Fix build on Raspberry Pi (3) 2016-09-06 21:54:53 +01:00
mudlord
f3a0d8518e mudlord is a fucking clot/hack and needs to be shot.
Should have tested on other drivers than Nvidia Windows.
2016-09-07 05:56:07 +10:00
twinaphex
6f47289ba6 Start adding HAVE_CONFIG_H to gfx/drivers_context 2016-09-06 19:39:02 +02:00
Alcaro
23dc89168a are those HAVE flags not set up there or something? 2016-09-06 19:21:33 +02:00
twinaphex
c3ba0ba4e9 Revert "Refactor core_system_info_* functions"
This reverts commit f637805c9edd0e17b72d459e319a195ded230276.
2016-09-06 08:38:26 +02:00
Brad Miller
94be5a8651 Update modern_pipeline_xmb_ribbon.glsl.vert.h
nit
2016-09-06 15:58:37 +10:00
mudlord
d77759cc1b change 2016-09-06 15:45:57 +10:00
mudlord
73a1cd4631 greatly optimized modern vertex shader for ribbon. 2016-09-06 15:42:16 +10:00
twinaphex
f637805c9e Refactor core_system_info_* functions 2016-09-06 07:08:38 +02:00
twinaphex
82d82110ae Merge system.h with core.h 2016-09-06 06:11:54 +02:00
twinaphex
3e9df72123 Try to fix ARM build 2016-09-06 03:14:20 +02:00
twinaphex
075aea2289 Header include cleanups 2016-09-06 00:56:00 +02:00
twinaphex
266a06ffb1 Revert "Expose GPU Hard Sync for GLES 3 too"
This reverts commit a74813c9eaff982d176dc9ef7b1c9e8284dab33d.
2016-09-05 21:43:02 +02:00
twinaphex
bd45d7a707 gl_capabilities.c - cleanups 2016-09-05 21:25:38 +02:00
twinaphex
67c2965612 OpenGL ES should not reach this code 2016-09-05 21:22:38 +02:00
twinaphex
a74813c9ea Expose GPU Hard Sync for GLES 3 too 2016-09-05 21:16:30 +02:00
twinaphex
280aa831b5 Remove verbosity.h header dependency on gl_capabilities.c 2016-09-05 21:12:44 +02:00
twinaphex
43edd76736 Add headers 2016-09-05 21:09:21 +02:00
twinaphex
86d2a36407 (Win32) Buildfixes 2016-09-05 18:43:32 +02:00
twinaphex
acd4dd527b Header include cleanups 2016-09-05 18:31:32 +02:00
twinaphex
f0702ac72c (PS3) Buildfix 2016-09-05 07:59:26 +02:00
twinaphex
f30deb9cd0 Header cleanup 2016-09-05 07:47:11 +02:00
twinaphex
e6ef3662ac Header include changes 2016-09-05 07:44:17 +02:00
twinaphex
76732249b6 Cleanups 2016-09-05 07:30:44 +02:00
Twinaphex
ef43a573a3 Silence warnings 2016-09-05 07:28:55 +02:00
twinaphex
1edaa20029 header cleanups for gl_capabilities.c 2016-09-05 07:26:32 +02:00
twinaphex
1bed2dc3c4 Buildfix 2016-09-05 07:22:44 +02:00