Commit Graph

75 Commits

Author SHA1 Message Date
twinaphex
4738ef545c Change interval type to signed int 2018-09-12 00:08:13 +02:00
Brandon Wright
533f898132 Add get refresh rate context function. Implement for X11 and Wayland. 2018-04-15 17:56:12 -05:00
twinaphex
16c1bd7a03 Create context get_api function 2018-03-01 21:16:54 +01:00
twinaphex
6f73bdf287 (Emscripten) Cleanups 2018-01-20 02:05:37 +01:00
Toad King
19facdb066 reset drivers shortly after toggling fullscreen mode
fixes black screen after going fullscreen in game
2018-01-15 02:12:53 -06:00
Toad King
b75f4b4f67 implement setting vsync and swapinterval
vsync is not "true" vsync (that's always on in browsers) but changes the main loop timer from immediate to window.requestAnimationFrame
2018-01-14 23:29:20 -06:00
Toad King
60f203d344 fix emscripten build 2018-01-14 16:03:44 -06:00
Toad King
c8f03b4640 fix fullscreen sometimes losing state 2018-01-14 15:19:37 -06:00
Toad King
5ef595be1a fix fullscreen 2018-01-14 02:33:22 -06:00
Toad King
77b158e6a2 fix compiler warning 2018-01-13 20:47:30 -06:00
Toad King
a77f9c37c6 start on bringing the emscripten video code up to speed with latest emscripten
fix rwebinput
2018-01-13 00:05:07 -06:00
twinaphex
b0398c1482 C89 build fixes 2017-05-19 03:34:53 +02:00
twinaphex
f928e57064 Combine video_context_driver.c and video_driver.c 2017-05-09 01:25:59 +02: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
6247d6ea1d Update check_window - we no longer need runloop.h inside context driver 2017-01-23 01:02:33 +01:00
twinaphex
4ea31e99aa Remove some header includes 2017-01-23 00:39:20 +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
b96e0bb820 Remove stub update_title functions 2017-01-19 01:58:44 +01:00
twinaphex
34da27c36b Don't need 'frame_count' variable for check_window 2017-01-18 21:47:12 +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
1fa3475d79 Add parameter to video_context_driver's 'init' function 2017-01-13 16:52:07 +01:00
twinaphex
80f79130c0 Update set_video_mode context driver callback function 2017-01-11 06:35:50 +01:00
twinaphex
36fb6776b2 Don't grab settings pointer in video_monitor_get_fps function 2017-01-09 15:42:14 +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
77e5cdbfde Revert "Rename runloop_msg_queue_push to video_driver_msg_queue_push"
This reverts commit ad7386913c.
2016-12-22 23:36:11 +01:00
twinaphex
ad7386913c Rename runloop_msg_queue_push to video_driver_msg_queue_push
and move code to video_driver.c
2016-12-22 13:15:02 +01:00
Logan McNaughton
4f002f2316 Specify EGL_DEPTH_SIZE for emscripten
Some drivers require it to provide a depth buffer.
2016-09-24 19:53:45 -06:00
twinaphex
83be6daa93 Try to prevent input driver from being set with Emscripten EGL context driver if HAVE_SDL2 is defined 2016-09-24 05:57:02 +02:00
twinaphex
7290c7e3c2 (Emscripten) Buildfix 2016-09-11 16:39:13 +02:00
twinaphex
51b0e61712 Cleanups 2016-09-11 16:24:02 +02:00
twinaphex
6f47289ba6 Start adding HAVE_CONFIG_H to gfx/drivers_context 2016-09-06 19:39:02 +02:00
twinaphex
acd4dd527b Header include cleanups 2016-09-05 18:31:32 +02:00
twinaphex
aa15fb3f91 Update remaining video context drivers 2016-08-31 15:02:07 +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
Alwin Garside
97b60b1e20 Fixed emscripten build 2016-03-13 15:30:30 +01:00
twinaphex
47fddf28e5 (Emscripten context) Cleanups 2016-03-01 07:07:56 +01:00
twinaphex
3b8932b302 Turn returntype of set_resize into bool 2016-01-07 00:58:33 +01: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
2d55dc3bda Complete namespace changes 2015-12-07 15:32:14 +01:00
twinaphex
85dbeeb8f9 No more video_monitor.h 2015-11-22 13:32:46 +01:00
twinaphex
b69caea6c1 Set g_egl_inited to false after egl_destroy 2015-11-21 09:39:25 +01:00
twinaphex
2f151896eb use egl_create_surface everywhere 2015-11-20 13:43:05 +01:00
twinaphex
1101bb34d3 Create g_egl_api/g_egl_inited 2015-11-20 13:27:31 +01:00
twinaphex
01614bb7f4 Start using egl_create_context in more drivers 2015-11-19 18:29:15 +01:00