Commit Graph

1402 Commits

Author SHA1 Message Date
Giovanni Cascione f93548ab56
mali_fbdev fix for fps drop after egl_destroy (#13494)
Currently each time a screen resolution or setting change occurs, fbdev_destroy, fbdev_init and fbdev_set_mode are called in sequence, trying to destroy context and surface (though context pointer seems to remain unchanged) and create again both of them.
However it seems something is wrong with egl_destroy, as after the call fps drops from 60 to 33fps in GUI with huge performance impact, at least with libmali.
Philosophy is changed with this commit to avoid destroying and creating context and surface each time (creation only occurs in fbdev_init and egl_destroy is called only if retroarch is shutting down).
As a minor modification, framebuffer is resetted to 0 on retroarch shutdown to avoid any chance of freezed screen effect.
2022-01-14 15:30:04 +01:00
Dystopian 2095fc53f8
Fix webOS build and run (#13480) 2022-01-12 07:12:34 +01:00
crystalct 19d05db9ae
PSL1GHT/PS3 build fix (#13446) 2022-01-06 08:21:14 +01:00
Giovanni Cascione f43b19db4f
mali_fbdev: fix for yoffset>0 (screen freezing), setterm unavailable and refresh_rate division by 0 (#13450)
-In case yoffset is not set=0 by the driver (which seems to occur randomly on certain configurations), on next set_video_mode call screen freezes and cannot be updated. Condition to set yoffset to 0 if current value is >0 is added as fix.
-If setterm is not available, sh error occurs in the shell on gfx_ctx_mali_fbdev_destroy call. Condition based on setterm availability is added to avoid this.
-If pixclock from driver is not available (=0), divide by 0 occurs when trying to calculate refresh rate. Condition is added as a fix, if pixclock=0 refresh rate is set as 60.
2022-01-05 19:26:39 +01:00
Colin Kinloch 22df09885e
(Wayland) Use any display for initial metrics (#13417) 2021-12-26 04:53:57 +01:00
tunip3 a28e226ef4
Make resolution switching automatic and fix angle output issues [UWP/XBOX] (#13406)
* force angle to render at 1080p regardless of screensize as the output is 1080p regardless of screensize.
This fixes an issue where at 4k any angle output would be zoomed into a corner

* set resolution based on display resolution (auto 4k)

* set driver to d3d11 if booting with opengl

* reset width and height of output on boot to match display

Co-authored-by: Tunip3 <tunip3@users.noreply.github.com>
2021-12-24 14:34:30 +01:00
twinaphex e1d144e2b8 (Wayland) Style nits 2021-12-24 14:29:12 +01:00
Colin Kinloch f0392474f2
(Wayland) Add libdecor for client side decoration (#13397) 2021-12-24 14:20:45 +01:00
Colin Kinloch 1afbe4a326
(Wayland) Use checked sizes in EGL resize (#13394) 2021-12-24 03:27:07 +01:00
Colin Kinloch 7d52d43667
[Wayland] Fix window title update (#13396) 2021-12-24 03:14:20 +01:00
Tony 09880e92d2
Logging cleanups (#13320) 2021-12-04 14:21:12 +01:00
jdgleaver 196cc8b33d SDL1 buildfix 2021-11-12 12:35:31 +01:00
twinaphex 758eafa686 (SDL) Potential buildfix 2021-10-20 15:57:34 +02:00
Autechre 3f179a5762
Merge pull request #12632 from Sunderland93/remove-xdg-shell-v6
[Wayland] Remove xdg-shell-v6 protocol
2021-10-07 05:10:53 +02:00
Francisco Javier Trujillo Mata 3bbfcf7b39 Adding to get_video_output_size 2 parameters for additional info 2021-10-04 23:53:55 +02:00
twinaphex 8ef9065c86 Get rid of menu_driver_is_alive - we don't want these one/two-line getters/setters anymore 2021-09-28 10:27:00 +02:00
twinaphex 31eaeb1a03 Create gl_flush 2021-09-26 22:28:28 +02:00
twinaphex d4af68d2dd Add glsym/rglgen.h for x_ctx.c 2021-09-26 22:16:18 +02:00
twinaphex 76db3e02cf Create gl_clear 2021-09-26 22:10:53 +02:00
twinaphex 4aafbf2340 Create gl_common.c/gl_common.h 2021-09-26 19:57:08 +02:00
twinaphex 4b5951bda3 Rename gl_common.h to gl2_common.h and remove some file dependencies
on it
2021-09-26 17:42:12 +02:00
Mark W. Kidd 2b3dfeb10c standardize include path for config.h 2021-08-18 18:54:40 -04:00
Autechre f0bd4e9172
Merge pull request #12785 from sonninnos/win32-vulkan-cleanup
(WIN32/Vulkan) Refresh rate fixes + cleanups
2021-08-12 19:23:29 +02:00
sonninnos 11b0667e72 (WIN32/Vulkan) Refresh rate fixes + cleanups 2021-08-12 18:33:58 +03:00
twinaphex 20ef0667b0 Add initial webOS port courtesy of informatic/webosbrew/mariotaku 2021-08-11 20:04:11 +02:00
twinaphex e596bf7925 Buildfix for previous commit 2021-08-02 16:19:26 +02:00
twinaphex 2af9441d35 Create separate wnd_proc functions for winraw 2021-08-02 16:14:58 +02:00
CrystalCT 89b46bc246 First basic RSX driver for PSL1GHT 2021-07-12 09:35:44 +02:00
Aleksey Samoilov 6bc9181bc9 Remove xdg_shell_v6 from wayland_vk 2021-07-10 14:52:16 +04:00
Aleksey Samoilov 146804fcbc Remove xdg_shell_v6 support 2021-07-10 14:22:58 +04:00
p-sam 1bc588acbd Fix building with libnx 4.0.0 2021-06-28 17:38:17 +02:00
twinaphex 97ad8cbfd2 Remove this code for Vulkan over X too 2021-06-22 18:26:32 +02:00
twinaphex b5be2006f2 Remove commented out code 2021-06-22 18:25:54 +02:00
Grant bd10e5bdc3 fix x11 threaded videoc segfault 2021-06-21 21:12:26 +01:00
CTCaer a8028d5e8e X11: fix fullscreen when swapping monitors/resolution
Most DEs have the tendency to lose focus when monitor is getting swapped or the resolution changes.
That causes X11 exiting fullscreen and setting a lower resolution to fit desktop.
Pushing the window back to top, automatically fixes that and X11 enforces fullscreen again and new max resolution.

Additionally, XConfigure events are now checked and preferred over XGetWindowAttributes.
That saves several to hundreds μs per frame.
2021-05-29 22:19:19 +03:00
twinaphex 35543ecd91 Move defines files over to libretro-common 2021-05-18 22:15:04 +02:00
jdgleaver 484c4ad51e Add API extension for cores to override frontend fast-forward state 2021-05-13 13:16:37 +01:00
jdgleaver a501dfd680 Update 7-Zip dependency to latest stable version (fixes CHD support on static platforms) 2021-04-28 12:00:50 +01:00
David Carlier c7f3fa2b5d macOS with vulkan build fix 2021-04-26 20:31:15 +01:00
Autechre a56fcfb24a
Revert "Screen Resolution option fixes" 2021-04-17 19:33:23 +02:00
repojohnray 45047732a7 Fix xegl_ctx.c mouse activation
The mouse is not working when using opengles with x11. This fix adds the required notifications.
2021-04-03 15:56:06 +02:00
Valerio Proietti fc69e73dcf [DRM] set the correct video mode
mode->vrefresh is a display-only value and should not be used for calculations
the drm context is now able to differentiate between, for example, 640x480@60.00 and 640x480@59.92 when setting the video mode
2021-03-31 13:13:27 +02:00
jdgleaver 0a08437e0a Add OpenDingux Beta support 2021-03-25 16:19:42 +00:00
David Guillen Fandos 1cad93207b Upstream OGA patch for vertical screen
This keeps the tradition DRM driver along with the OGA one. The probe
function skips the driver if the screen is non rotated to fall back to
the regular DRM driver. This is being upstreamed from the Lakka repo.
2021-03-23 20:27:24 +01:00
sonninnos 371453623b Screen Resolution option fixes 2021-02-16 22:59:24 +02:00
Francisco José García García 066917ac23
Vita: VitaGL api changes (#11981)
* Vita: VitaGL api changes: vglSwapBuffers

* Vita: VitaGL api change: Remove vglStartRendering
2021-02-04 11:46:00 +01:00
Autechre 7ea1d7d0da
Revert "Mac buildfixes (#11933)" (#11934)
This reverts commit 18a6880900.
2021-01-24 03:56:05 +01:00
Autechre 18a6880900
Mac buildfixes (#11933)
* (Metal/WindowListener) Fix duplicate symbol errors by
moving implementation of WindowListener to cocoa_common.m

* (Apple) Cleanup some conditionals

* (Cocoa) Cut down on OSX ifdefs in Cocoa-specific code
2021-01-24 03:53:10 +01:00
Autechre 760c9a8482
(Mac) Remove Apple Core GL Context (#11912)
* Remove Apple CGL context - was never used and never tested
2021-01-21 00:33:12 +01:00
twinaphex 55a766b0bc (CocoaGL) Add forward declaration 2021-01-19 07:28:42 +01:00
twinaphex 6011ebd311 (cocoa_vk_ctx.m) Get rid of one static global 2021-01-19 06:44:09 +01:00
twinaphex eea8e12343 (CocoaGL) Get rid of one static global 2021-01-19 06:37:01 +01:00
twinaphex 7b3f042fc6 (CocoaGL) Get rid of IOS Interface extensions 2021-01-18 21:49:34 +01:00
twinaphex 6a091cf20a (cocoa_vk_cx) Cleanup 2021-01-18 21:43:33 +01:00
Twinaphex 69884a816f (Cocoa GL) OSX - get rid of bounds/scale extension of NSScreen 2021-01-18 21:38:02 +01:00
twinaphex 83210eafd8 Split up cocoa_gl_ctx.m into two parts - cocoa_gl_ctx.m
and cocoa_vk_ctx.m
2021-01-18 20:02:31 +01:00
twinaphex 456cc022f3 (Metal) Buildfix 2021-01-18 19:36:33 +01:00
twinaphex 8d31c410a0 move cocoa_get_metrics to cocoa_common.m 2021-01-18 19:33:06 +01:00
twinaphex a80a64f261 Add cocoa_update_title to cocoa_common.m 2021-01-18 19:28:36 +01:00
Twinaphex 3d17cf1e38 Move nsview_set/get/cocoaview_get to cocoa_common.m 2021-01-18 19:17:12 +01:00
Twinaphex eea07ea367 (COcoa GL/Cocoa Common) Refactor code for eventual splitting up
of cocoa_gl_ctx.m into two files
2021-01-18 15:41:30 +01:00
Twinaphex 4036cc42e0 fast_forward_skips and is_syncing should only be used for non-OSX 2021-01-18 14:51:03 +01:00
twinaphex 3200d138b0 (Cocoa GL) Move variables 2021-01-18 06:02:32 +01:00
twinaphex dfa3d216f8 (Cocoa GL) Refactors/cleanups 2021-01-18 04:34:51 +01:00
twinaphex f6d35ee462 (iOS) Cleanups 2021-01-18 03:03:35 +01:00
twinaphex 82c751ead0 Remove unused glcontext_get_ptr 2021-01-18 02:05:29 +01:00
twinaphex 7bdbcfa2cc (CocoaGL) Cleanups 2021-01-18 01:57:03 +01:00
twinaphex 39a98d5dfc (Cocoa GL) Cleanups 2021-01-18 01:52:05 +01:00
twinaphex 2670613f6c Don't use nativeScale/scale for OSX 2021-01-18 00:50:07 +01:00
Twinaphex 5a9598c238 get_backing_scale_factor - fix build 2021-01-18 00:30:58 +01:00
twinaphex 4117a4cbda Rewrite get_backing_scale_factor - stop depending on runtime selector
invocations
2021-01-18 00:25:36 +01:00
twinaphex 6ac08ec123 Make customized version of get_video_size for OSX 10.7 and up to
avoid selector grabbing
2021-01-17 05:39:03 +01:00
twinaphex e42f2b552f (COcoa GL context) Small cleanups 2021-01-17 05:22:29 +01:00
twinaphex 1e9f6f175e (OSX) Fix PowerPC build 2021-01-17 05:02:07 +01:00
Twinaphex 7177a8e7d9 Remove unused variable 2021-01-16 23:05:37 +01:00
twinaphex 4d5126f71a Improve cocoagl_gfx_ctx_get_native_scale 2021-01-16 23:03:25 +01:00
twinaphex 225b851eb6 Cleanups 2021-01-16 22:04:11 +01:00
twinaphex 757ea32782 Go back to CocoaView pointer in prototype 2021-01-16 20:37:56 +01:00
twinaphex 4e74a6f8b1 Attempt to fix build for iOS 2021-01-16 17:02:25 +01:00
OsirizX b96a0c495a [VITA] Add support for Vita GLES2 (PIGLET) 2021-01-06 19:14:30 +01:00
valadaa48 e21784f9c4 drm_go2: Dynamic resolution support
- Remove hardcoded values for width and height and query from drm
  context instead
2021-01-04 19:01:59 -05:00
twinaphex 9ddc39af59 Buildfix 2020-12-27 20:01:41 +01:00
twinaphex c3ba223fe2 Do away with objc_msgSend calls 2020-12-27 17:31:57 +01:00
Aaron Kling 57e3ab71d9 android: retro_sleep build fix 2020-12-22 17:29:26 -06:00
twinaphex 7dcfd7a038 retro_sleep buildfix 2020-12-21 21:11:59 +01:00
twinaphex 627b668da8 Another buildfix for retro_sleep 2020-12-21 21:06:54 +01:00
twinaphex 16bb56b7a2 Update 2020-12-21 21:04:31 +01:00
cpasjuste e31182b005 (KMS/DRM) cleanup custom video mode loading (crt_switch_timings) 2020-11-19 10:21:18 +01:00
cpasjuste 485513ba61 (KMS/DRM) correctly handle custom modes polarity, implement aspect ratio support from hdmi_timings 2020-11-18 15:21:03 +01:00
cpasjuste 0082806620 (KMS/DRM) add support for custom modes from hdmi timings 2020-11-18 11:34:44 +01:00
twinaphex f84c6ec8cd Use STRLEN_CONST where possible; and don't needlessly do strlen
twice
2020-10-02 20:57:29 +02:00
Ophidon 2f36c94f3f Variable BFI
BFI support added for 180hz / 240hz / etc. Solves issue with image retention from voltage issues at 120hz BFI. Also disabled BFI while in menu, as if set to an incorrect value for the current refresh rate, could cause severe flickering and difficulty reverting to the correct value.
2020-09-18 11:57:32 -04:00
Twinaphex 62f4eae323 (Cocoa) Cleanups 2020-09-15 20:53:48 +02:00
twinaphex 26b2295759 (cocoa_gl_ctx.m) Style nits 2020-09-15 11:28:04 +02:00
twinaphex c133c2a10c (Cocoa GL ctx) Add updateSel 2020-09-14 23:59:42 +02:00
Twinaphex 13e553a34b get_backing_scale_factor - use class_respondsToSelector 2020-09-14 21:27:22 +02:00
twinaphex fb6642192d Add TARGET_OS_OSX ifdef around this 2020-09-14 16:17:31 +02:00
Twinaphex 2bfadbdad5 (Apple CocoaGL) Call flushBuffer with msg_objcSend 2020-09-14 16:15:53 +02:00
twinaphex a82bff2055 (Wayland) Fix serious warnings - input struct pointer was being passed
to function that requires gfx struct pointer
2020-08-31 19:56:03 +02:00
Autechre 094ae69b09
Update x_vk_ctx.c 2020-08-31 14:17:36 +02:00
twinaphex 5f08605680 Refactor joypad drivers 2020-08-30 05:29:32 +02:00
twinaphex 4d1cfa9c41 Make the 'raw' versions the generic function for the message loop
callback - this way it's reused for SDL2 input driver too
2020-08-28 02:55:39 +02:00
twinaphex 32279c3a70 Split up wnd_proc_common_internal into two - one for dinput,
one for raw
2020-08-28 02:21:13 +02:00
twinaphex 73fc7c9873 Rename create_graphics_context to create_wgl_context 2020-08-28 01:29:23 +02:00
Érico Rolim 87d99601f6 [gfx] Fix static function placement.
In gfx/drivers_context/vc_egl_ctx.c, move gfx_ctx_vc_bind_api
declaration to before it's called by any other function, otherwise it
warns about "warning: implicit declaration of function" and can error
out with "error: conflicting types for 'gfx_ctx_vc_bind_api'" in certain
cases.
2020-08-10 00:51:14 -03:00
Twinaphex b1723f7cd0 Remove unused CocoaTouch menu - allows us to get rid of a lot of
dead code
2020-08-09 19:41:04 +02:00
twinaphex ae662b4fe2 Cleanup android_gfx_ctx_bind_api 2020-08-04 01:56:38 +02:00
twinaphex 197465c1ea make_current is only ever used for GL, so move it out of
video_driver_load/unload_texture and into the inner GL
drivers
2020-07-27 10:26:13 +02:00
twinaphex 3d893b7602 Add extra parameter to unload_texture 2020-07-27 10:15:28 +02:00
twinaphex 6922a36ea1 (CocoaGL) Another buildfix 2020-07-22 22:25:28 +02:00
twinaphex b78591d9b6 Buildfix 2020-07-22 22:18:18 +02:00
Autechre 95221945bb
Merge pull request #11065 from yoshisuga/yoshisuga/ios-metal-dpi
[iOS][tvOS][Metal] Support getting video metrics to support proper touchscreen interactions
2020-07-22 07:09:24 +02:00
twinaphex 12a4fa0809 Buildfix 2020-07-22 00:46:16 +02:00
twinaphex ca2a59e03d (Cocoa GL) Global variable cleanups 2020-07-22 00:44:45 +02:00
Yoshi Sugawara c462aaf374 iOS Metal: implement the metric method for the graphics context to support getting the dpi - this is needed to make the touch interactions with the menus work. Update the metal and opengl graphics context to support a lower dpi for larger screen iPhones to make better use of the screen 2020-07-21 11:33:37 -10:00
Autechre 6c7143d02d
Merge pull request #10981 from yoshisuga/yoshisuga/ios-metal
iOS/tvOS Metal Renderer
2020-07-21 20:41:07 +02:00
Yoshi Sugawara 271ac7f925 support the OpenGL driver in the metal build by delegating the view initialization to the ApplePlatform delegate (metal build only for now) 2020-07-20 14:00:28 -10:00
twinaphex 465e84d60c (context drivers) Make names uniform 2020-07-20 18:22:33 +02:00
twinaphex 7574a80391 Change some context driver names 2020-07-20 18:15:37 +02:00
twinaphex 9ac9309991 Optimize call to vulkan_present 2020-07-20 04:45:12 +02:00
Yoshi Sugawara 3dc716299f replaced confusing ifdef with a more concise #if TARGET_OS_OSX 2020-07-19 07:54:47 -10:00
Yoshi Sugawara fd9ac64d55 Merge branch 'master' into yoshisuga/ios-metal 2020-07-19 00:33:54 -10:00
twinaphex 34662e8fe8 (Context drivers) Cleanups - use egl_get_proc_address directly instead
of wrapper functions
2020-07-18 17:22:24 +02:00
twinaphex 7c66f0adbc Simplify win32_check_window 2020-07-18 17:09:07 +02:00
twinaphex 0ccb86d130 Cleanup 2020-07-18 14:15:23 +02:00
twinaphex 80c405ce52 Cleanups 2020-07-18 14:11:13 +02:00
twinaphex ef552ba768 Style nits/cleanups 2020-07-18 14:06:45 +02:00
twinaphex ebd62ecd78 Cleanups 2020-07-18 14:01:35 +02:00
twinaphex 8cfbe3b8d4 Cleanups 2020-07-17 20:35:11 +02:00
twinaphex 9f9d59f2be Cleanups 2020-07-17 16:46:00 +02:00
twinaphex 2e4938601a Cleanups 2020-07-17 16:34:11 +02:00
twinaphex 8390388f3f (DRM Go2) This global seems unused, remove it 2020-07-17 16:30:01 +02:00
twinaphex fcf0663baa (DRM CTX) Get rid of static globals - put them in struct 2020-07-17 16:26:57 +02:00
twinaphex 318c11129b Cleanups 2020-07-17 15:02:14 +02:00
twinaphex 5deb8f8bd8 Cleanups 2020-07-17 14:59:19 +02:00
twinaphex 1ca5958832 Cleanups 2020-07-17 14:57:00 +02:00
twinaphex 3983a19281 (Context drivers) Cleanups 2020-07-17 14:53:49 +02:00
twinaphex 7c66a7457a Go for a consistent return value 2020-07-17 14:44:57 +02:00
twinaphex b02d538a63 set_resize should not return false on success 2020-07-17 14:43:47 +02:00
twinaphex d2b749e0e6 Unnecessary 2020-07-17 14:19:17 +02:00
twinaphex 1fb77c43a3 (X11) Split up X11 context into two - GL and Vulkan 2020-07-17 14:15:30 +02:00
twinaphex e8e9a7b1d3 Get rid of multiple definition of wayland show mouse function 2020-07-17 13:59:13 +02:00
twinaphex f4bc332bcd (Wayland) Split up Wayland context driver into two - GL and Vulkan 2020-07-17 13:55:25 +02:00
twinaphex 501f737249 (Android) Split up Android context driver into two - GL and Vulkan 2020-07-17 13:45:37 +02:00
twinaphex 2ff2604e69 MSVC buildfix 2020-07-17 04:35:01 +02:00
twinaphex cbca370d76 Split up wgl_ctx.c into two files - GL and Vulkan 2020-07-17 04:28:26 +02:00
twinaphex df73277ca8 (WGL) Bind different callback for Vulkan 2020-07-17 02:31:12 +02:00
twinaphex 105e135e48 Cleanup 2020-07-17 01:20:31 +02:00
twinaphex 6a5770af6d Cleanups 2020-07-17 01:17:37 +02:00
twinaphex 707b40d116 Cleanups 2020-07-17 01:09:00 +02:00