Commit Graph

120 Commits

Author SHA1 Message Date
Kyle Brenneman a4d19e174a Define the platform enums if they aren't in eglext.h.
Add #defines for EGL_PLATFORM_X11_KHR, EGL_PLATFORM_WAYLAND_KHR, and
EGL_PLATFORM_GBM_KHR, if they aren't already defiend in eglext.h.
2017-04-19 07:08:05 -06:00
Kyle Brenneman fcccc9dc0b Use eglGetPlatformDisplay when it's available.
Added a platform parameter to egl_init_context. If the caller provides a
platform other than EGL_NONE, then it will try to use eglGetPlatformDisplay or
eglGetPlatformDisplayEXT instead of eglGetDisplay.

If neither eglGetPlatformDisplay or eglGetPlatformDisplayEXT is supported, then
it will still fall back to calling eglGetDisplay.

Updated the Wayland, X11, and DRM callers to use the correct platform enum.
Those are the callers that don't just pass EGL_DEFAULT_DISPLAY as the native
display handle.

Calling eglGetDisplay with any value other than EGL_DEFAULT_DISPLAY is
inherently unreliable, because it requires the EGL implementation to guess a
platform type based on a (void *) pointer. Some implementations might not
identify a particular platform, or worse, might guess wrong.

Fixes https://github.com/libretro/RetroArch/issues/4790
2017-04-16 14:19:40 -06:00
twinaphex 805470072b Make desktop_mode a static variable inside x11_common.c 2017-03-23 20:07:56 +01:00
twinaphex 1ce3b12335 Split up xinerama functions into separate files 2017-03-23 19:59:11 +01:00
twinaphex 09e7186a4e Start splitting up xinerama functions 2017-03-23 19:46:06 +01:00
twinaphex 1ea3bea0ee Don't pass video_info by value to context_driver init function 2017-01-22 18:29:22 +01:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex 9d1de5c974 Rewrite video_context_driver_set_resize 2017-01-19 14:31:57 +01:00
twinaphex a6a4808e94 Refactor frame monitor code 2017-01-18 17:41:27 +01:00
twinaphex 666534cc74 Grab settings pointer only once inside wrapper 'input_driver' function 2017-01-16 00:14:10 +01:00
twinaphex 23017e0b45 Cleanups 2017-01-13 16:57:57 +01:00
twinaphex 1fa3475d79 Add parameter to video_context_driver's 'init' function 2017-01-13 16:52:07 +01:00
twinaphex 7d0056d422 Minimize dependence on settings struct from within context drivers 2017-01-11 06:44:41 +01:00
twinaphex 80f79130c0 Update set_video_mode context driver callback function 2017-01-11 06:35:50 +01:00
twinaphex 8bd12368ef Pass joypad_driver name to input_driver_init function and make
sure we don't need to access the settings struct from the
input driver
2017-01-10 17:59:48 +01:00
twinaphex c086a18ceb video_driver_frame_filter no longer needs to grab pointer to
settings
2017-01-09 15:46:40 +01:00
twinaphex 35fefb1c09 Do away with yet more pointer grabbing of settings 2017-01-09 15:14:16 +01:00
twinaphex 6b3cc9068d Pass video_info to swap_buffers too 2017-01-09 14:59:15 +01:00
twinaphex 3d92ce140e Pass video_frame_info_t to update_window_title 2017-01-09 14:42:07 +01:00
twinaphex 027a194346 (xegl_ctx.c) Style nit 2016-11-06 18:41:59 +01:00
twinaphex 3b1cf79c63 (X contexts) Cleanups 2016-10-08 14:37:26 +02:00
twinaphex 51b0e61712 Cleanups 2016-09-11 16:24:02 +02:00
twinaphex 7a36ea7d1c Silence warnings 2016-09-08 06:11:02 +02:00
twinaphex 6f47289ba6 Start adding HAVE_CONFIG_H to gfx/drivers_context 2016-09-06 19:39:02 +02:00
twinaphex 815c0eb3ee Remove header includes 2016-09-01 05:46:10 +02:00
twinaphex aa15fb3f91 Update remaining video context drivers 2016-08-31 15:02:07 +02:00
amspady20 9adc8e34c0 Update xegl_ctx.c
Fixed include statment for frontend_driver.h
2016-07-08 12:30:53 -04:00
twinaphex 76cc6fd8ec Start implementing signal handler code once in frontend driver code 2016-07-08 02:38:33 +02:00
twinaphex 21438fc0af Some buildfixes for GL_DEBUG 2016-05-12 02:58:09 +02:00
Torsten Paul 1979ea52d2 Suppress screensaver only if requested by user settings. 2016-05-08 19:22:45 +02:00
Hans-Kristian Arntzen d723411436 De ioctl video_driver. 2016-05-08 14:00:51 +02:00
Torsten Paul ccb224043b Initialize window name at window creation time (fixes #1521).
The protocol error reported in #1521 is caused by two different issues.
First xdg-screensaver fails to parse decimal values for the window id
(https://bugzilla.redhat.com/show_bug.cgi?id=1274931). Using the hex
notation fixes this part.

Second, the script reads the WM_NAME property from the window which is
not yet available at this time. Calling x11_update_window_title() early
ensures the property is set when xdg-screensaver is run.
2016-05-06 00:17:47 +02:00
twinaphex 60233d1abb Add set_flags to context driver 2016-05-05 17:35:28 +02:00
twinaphex 8136683ffc (context drivers) Start exposing core GL flag 2016-05-05 05:46:00 +02:00
twinaphex a0425dfb14 (Context drivers) Add get_flags function 2016-05-05 05:35:35 +02:00
twinaphex 64a77af881 Use RARCH_DISPLAY_CTL_HW_CONTEXT_GET directly instead of
going through video_driver_callback
2016-03-04 20:49:55 +01:00
twinaphex 32c4f13761 (XEGL) Add HAVE_VG ifdefs 2016-03-01 06:56:41 +01:00
twinaphex e938be3747 Have to rewrite EGL context code 2016-03-01 06:49:05 +01:00
twinaphex 22a677b3a8 Don't use egl_common's 'api' variable anymore 2016-02-22 11:54:19 +01:00
twinaphex cbf84b8d6e Style nits 2016-02-14 16:39:27 +01:00
twinaphex 54f46f4ee3 Update headers 2016-01-10 04:41:52 +01:00
twinaphex 3b8932b302 Turn returntype of set_resize into bool 2016-01-07 00:58:33 +01:00
Higor Eurípedes 1cf574cfbe Move most of egl_common globals into egl_ctx_data_t 2015-12-08 13:54:03 -03:00
Higor Eurípedes c257374dcd (video_context_driver) Make better use of the data argument in context calls 2015-12-08 12:19:08 -03:00
twinaphex a95762e5cb Create egl_has_config 2015-12-08 14:42:02 +01:00
twinaphex 0f94353b28 Create egl_get_native_visual_id 2015-12-08 14:38:06 +01:00
twinaphex 6c6beca430 Create x11_save_last_used_monitor 2015-12-01 08:49:35 +01:00
twinaphex c4354ff429 Create g_x11_screen 2015-12-01 08:42:33 +01:00
twinaphex 0044d853f8 Move display_type / display_window etc all to gfx/video_driver.c -
no more dependencies on driver_t
2015-11-29 01:12:49 +01:00
twinaphex 866501703f Cleanups 2015-11-23 21:28:54 +01:00