Commit Graph

5703 Commits

Author SHA1 Message Date
twinaphex
12949420b6 (Windows) Buildfix 2016-09-17 15:07:45 +02:00
twinaphex
6002fd9f2a (shader_vulkan.cpp) Nits 2016-09-16 17:50:57 +02:00
twinaphex
99aae8537b Use string_is_equal/stdstring.h 2016-09-16 17:33:18 +02:00
twinaphex
cb17c0f493 Style nits 2016-09-16 13:31:18 +02:00
Bastien Nocera
5afdd35e54 x11: Only call out to xdg-screensaver when D-Bus failed 2016-09-16 13:03:48 +02:00
Bastien Nocera
a061b4a801 x11: Implement xdg-screensaver uninhibition 2016-09-16 13:03:37 +02:00
Bastien Nocera
e563bd5512 x11: Flatten D-Bus (un)inhibit functions
Instead of nesting, try to exit as soon as possible in case of errors.
Also make sure to tell the caller whether the call succeeded and a
fallback should be attempted.
2016-09-16 12:59:16 +02:00
Bastien Nocera
297c9a8613 x11: Reset dbus_connection global variable on exit
To ensure that the state of the variable is correct. This won't be
needed if X11 is never reinitialised.
2016-09-16 12:34:15 +02:00
Bastien Nocera
6ab7fab326 x11: Lower the severity of D-Bus not being accessible
As there is a fallback through xdg-screensaver, no need to make this any
more important than a log message.
2016-09-16 12:32:22 +02:00
Bastien Nocera
65fa874c3a x11: Rename function fetching the D-Bus connection
You'd expect a "get" function to return the variable in question. This
doesn't, and simply sets a global variable.
2016-09-16 12:32:15 +02:00
Alcaro
f6b7fc17f6 Those checks aren't needed. 2016-09-16 00:45:00 +02:00
Alcaro
9485263555 Fix implicit strstr 2016-09-15 21:16:25 +02:00
Alcaro
1964491e5f Fix Linux-MinGW build 2016-09-15 20:54:14 +02:00
twinaphex
7d5b9f172a Cleanups 2016-09-14 22:46:29 +02:00
twinaphex
1b46f3c344 Nits 2016-09-14 15:58:53 +02:00
twinaphex
f87dbe7946 Style nits/cleanups 2016-09-14 15:58:03 +02:00
twinaphex
ca673b4fc8 C89_BUILD fixes etc. 2016-09-14 15:56:14 +02:00
Twinaphex
09ccef1684 Merge pull request #3547 from nguillaumin/wip-screensaver-dbus
WIP: Fixes #2026 Screensaver suspend on Linux via Dbus
2016-09-14 15:48:43 +02:00
twinaphex
1b9a067bcc Move code to apple_compat.h 2016-09-14 14:10:39 +02:00
twinaphex
d2dbe63b2b Cleanup 2016-09-12 18:37:32 +02:00
twinaphex
d4be224ea6 Header include cleanups 2016-09-12 18:34:57 +02:00
twinaphex
b4d75fbafd Cleanups 2016-09-12 17:29:01 +02:00
twinaphex
93d98069b2 Cleanups 2016-09-12 16:45:26 +02:00
twinaphex
1fea80c630 Another header cleanup 2016-09-11 18:49:38 +02:00
twinaphex
d3f7bf8527 Move video_state_python to gfx/drivers_tracker 2016-09-11 17:59:10 +02:00
twinaphex
22022f8133 Cleanup 2016-09-11 17:55:46 +02:00
twinaphex
e427a2d2fa Move enums to gfx/video_thread_wrapper.c 2016-09-11 17:42:53 +02:00
twinaphex
88c7976104 Rename CMD_NONE to CMD_VIDEO_NONE 2016-09-11 17:40:26 +02:00
twinaphex
4b63af59a2 video_thread_wrapper.h - get rid of some ifdefs 2016-09-11 17:24:22 +02:00
twinaphex
d4797781ea (GX) Buildfix 2016-09-11 16:44:29 +02:00
twinaphex
3cf24afc44 (CTR) Buildfix 2016-09-11 16:43:56 +02:00
twinaphex
6d7602d47f Fix C89_BUILD 2016-09-11 16:43:28 +02:00
twinaphex
7290c7e3c2 (Emscripten) Buildfix 2016-09-11 16:39:13 +02:00
Alcaro
0720d5ad77 Kill warning 2016-09-11 16:38:36 +02:00
twinaphex
51b0e61712 Cleanups 2016-09-11 16:24:02 +02:00
twinaphex
7e83162c60 Remove general.h 2016-09-11 15:10:58 +02:00
twinaphex
606e37fcbd Cleanups 2016-09-11 15:07:07 +02:00
twinaphex
7ac1ed7e10 Cleanups 2016-09-11 14:54:34 +02:00
twinaphex
202e3e796e Get rid of more general.h includes 2016-09-11 14:46:53 +02:00
nguillaumin
c69c488fdf Address code review comments 2016-09-09 18:08:54 -07:00
twinaphex
164d3b034c Get rid of OSX_PPC 2016-09-09 15:56:56 +02: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