1415 Commits

Author SHA1 Message Date
LibretroAdmin
2870a0a8ad
Revert "Workerized emscripten retroarch (WIP) (#17484)" (#17492)
This reverts commit cacd5a9a234f3c9abc8d352f6fea19117e2e1a00.
2025-01-30 21:35:58 +01:00
Joe Osborn
cacd5a9a23
Workerized emscripten retroarch (WIP) (#17484)
* workerized RA

* Workerized (non-async) web player, using OPFS

This patch eliminates the need for asyncify and uses modern filesystem
APIs instead of the deprecated, unmaintained BrowserFS.

This is a WIP patch because it won't fully work until these two
Emscripten PRs land and are released:

https://github.com/emscripten-core/emscripten/pull/23518
https://github.com/emscripten-core/emscripten/pull/23021

The former fixes an offscreen canvas context recreation bug, and the
latter adds an equivalent to BrowserFS's XHR filesystem (but without
the hazardous running-XHR-on-the-main-thread problem).

The biggest issue is that local storage of users who were using the
old version of the webplayer will be gone when they switch to the new
webplayer.  I don't have a good story for converting the old BrowserFS
IDBFS contents into the new OPFS filesystem (the move is worth doing
because OPFS supports seeking and reading only bits of a file, and
because BrowserFS is dead).

I've kept around the old libretro webplayer under
pkg/emscripten/libretro-classic, and with these make flags you can
build a non-workerized RA that uses asyncify to sleep as before:

make -f Makefile.emscripten libretro=$CORE HAVE_WORKER=0 HAVE_WASMFS=0 PTHREAD=0 HAVE_AL=1

I also moved the default directory for core content on emscripten to
not be a subdirectory of the local filesystem mount, because it's
confusing to have a subdirectory that's lazily fetched and not
mirrored to the local storage.  I think it won't impact existing users
of the classic web player because they already have a retroarch.cfg in
place.

* Get fetchfs working without manifest support

* makefile fixes
2025-01-30 19:58:18 +01:00
BinBashBanana
ed1810de86
Emscripten improvements (#17422) 2025-01-29 05:29:16 +01:00
LibretroAdmin
839b7654db More standardization of local len variables 2025-01-07 03:20:39 +01:00
Colin Kinloch
e3cc0341b9
wayland: Fix improperly sized commits (#17309)
* Revert "wayland: Ignore splash sized events during splash"

This reverts commit 5ef24debe491666bc2dffe0f64d811862b90afb5.

* wayland: Fix improperly sized commits

* Set viewport on splash commit
* Don't commit "set video mode" viewport update
* Hide the libdecor frame before transitioning to fullscreen
2024-12-29 18:56:17 +01:00
Aleksey Samoilov
4fc6bbe8c2
wayland: improve logging (#17291)
* wayland: improve logging

* wayland: minor cleanup
2024-12-27 15:51:13 +01:00
Eric Warmenhoven
8d640fc048
ios9: Fix using opengles2 context (#17269) 2024-12-19 13:30:01 -08:00
Eric Warmenhoven
4d335c4855
iOS: Fix CAMetalLayer nativeScale confusion (#17225) 2024-12-02 07:52:38 -08:00
Eric Warmenhoven
ea1b6852c5
apple: switch from MTKView to CAMetalLayer for vulkan (again) (#17045) 2024-09-27 14:36:45 -07:00
pastalian
4ce7dd6fd5
Explicitly cast to a pointer in wayland builds (#17019)
The build with `--enable-wayland --disable-kms` has a part where an
unsigned long is passed as a void*, but GCC 14 enforces
-Werror=int-conversion, causing the build to fail.
https://gcc.gnu.org/gcc-14/porting_to.html#int-conversion
2024-09-20 14:19:24 -07:00
Eric Warmenhoven
187497eea8
Revert "apple: switch from MTKView to CAMetalLayer for vulkan (#16959)" (#17017)
This reverts commit 95d53183f5d3b8719a4c2d595b12de16da2e31af.
2024-09-19 11:48:40 -07:00
Eric Warmenhoven
60ee32b879
apple: display server, including ProMotion support (#16963) 2024-09-04 22:52:59 -07:00
Eric Warmenhoven
95d53183f5
apple: switch from MTKView to CAMetalLayer for vulkan (#16959) 2024-09-03 19:02:00 -07:00
libretroadmin
a0dc153508 Fix C89_BUILD 2024-04-06 18:52:52 +02:00
Colin Kinloch
0212d8e770
wayland: Ignore splash sized events during splash (#16412) 2024-04-05 11:02:33 -07:00
Colin Kinloch
cdd6aed8ec
wayland: Ignore configure events during splash (#16398)
These were causing the gl/vk surfaces to be created with the wrong size.
2024-04-02 17:55:02 -07:00
aerisarn
8b1e4a1ad0
MESA UWP Integration (#16285)
* [WINRT] Enable logging on __WINRT__ and bypass verbosidy in debug

* [UWP] wrong configuration prevents GLES to compile, common functions defines GL symbols

* [UWP] configure project to allow OPENGL on default configuration and copy MESA DLLs into UWP release

* [UWP] add MESA headers

* [UWP] add MESA EGL.lib needed for GLES context. However HAVE_OPENGL is better as GL cores use desktop version, so this is left for reference and to make the solution build with HAVE_OPENGLES

* [UWP] UWP is missing some GDI function definitions, implemented into MESA Gallium

* [UWP] Configure Release project too

* [UWP] Add mesa alpha-2 release dlls

* [UWP] allow griffin and vide_driver to have an OPENGL context

* [UWP] allow wgl context to work with mesa under WINRT

* [UWP] BUG: have to modify height/width getters and align them to MESA because the screen resolution is not right in gl context. Pending further investigation

* [UWP] fix ANGLE build

* [UWP] remove duplicate import code.

* (UWP) Cleanup filters file

* MESA screen destroy fix and Yabasanshiro hack. Align to alpha-2-hack tag

---------

Co-authored-by: Gabriel Morazán <35014183+GABO1423@users.noreply.github.com>
2024-03-02 09:36:17 -08:00
Subs
c264c5a8de
fix a buffer overflow on DRM mode name (#16245) 2024-02-18 08:23:20 -08:00
Eric Warmenhoven
0cbc8d2a56
OSX: Only look at major GL version when creating context (#16185) 2024-02-01 12:23:54 -08:00
Eric Warmenhoven
d2253c3de3
iOS/tvOS: create gl context as gles3 (#15958)
iOS 7+ supports gles3, which is backwards compatible with gles2. This
doesn't enable the glcore driver (which isn't working on ios yet), it
just changes the underlying context.

This fixes some of the rendering performance problems on mupen64plus_next.
2023-11-30 03:30:17 -08:00
zoltanvb
fd04c8ca57
Rebase of wakira's wp_fractional_scale_v1 support (#15965)
A rebase of earlier PR https://github.com/libretro/RetroArch/pull/15355
No changes added (except for one log).
2023-11-30 03:29:38 -08:00
Joe Osborn
862bebf687
(Emscripten) Modularize the JavaScript and clean up the web build (#15688)
* Increase emscripten stack size and decrease path size to fix emscripten builds broken since de45fc2

* use modularize flags for better-behaved javascript output

* makefile and loader changes

* use specialHTMLTargets to support modular access to canvas

* bind key events to canvas, not document

This way focus means focus and we can have multiple RA instances in
one page.

* Work around an emscripten bug in strict mode

* (Emscripten) Use console.error() for error messages

* increase asyncify stack size

* Fix `-lm` flag-related compile warnings in emscripten

---------

Co-authored-by: Rob Loach <robloach@gmail.com>
2023-11-02 13:25:50 -07:00
libretroadmin
f53ada6489 Cleanups, style nits, try to reduce some more strlens, etc. 2023-08-17 18:20:45 +02:00
libretroadmin
5f94f36204 Explicit typecasts to bool 2023-08-16 17:10:59 +02:00
libretroadmin
0a96f9595c Explicit typecasts to bools for flags 2023-08-16 04:18:55 +02:00
libretroadmin
be65a13102 Cut down on update_title code duplication 2023-07-16 08:00:49 +02:00
libretroadmin
c0d3b8f14b Buildfix for X11 - rename win32_suppress_screensaver to
win32_suspend_screensaver
2023-06-20 11:56:25 +02:00
libretroadmin
5e2bfcbe09 x11_show_mouse and win32_get_video_output_size - get rid of duplicate
code
2023-06-20 11:46:00 +02:00
libretroadmin
08ba0b53c6 Standardize x11_suspend_screensaver 2023-06-20 11:37:29 +02:00
libretroadmin
5971f24237 Remove some code duplication 2023-06-20 09:37:07 +02:00
libretroadmin
700b58a77a Small cleanup to drm_ctx.c 2023-06-20 08:43:46 +02:00
libretroadmin
1cff8e26f4 (Android) Move DPI metric code to dispserv_android.c - and remove
duplicate code
2023-06-20 08:31:19 +02:00
libretroadmin
45a2736958 (Wayland) Cleanups 2023-06-20 07:25:00 +02:00
libretroadmin
6a147370d0 (Wayland) Cleanups 2023-06-20 07:08:14 +02:00
Bernhard Schelling
fa443845dd Fix building drm_ctx.x without crt switchres 2023-06-19 18:18:13 +02:00
Grisly Glee
de0c6d5cd1
Trivial warnings fixes (#15383)
* Trivial graphics context drivers fix

* Assorted minor warnings fixes
2023-06-14 23:46:27 +02:00
libretroadmin
246cceeb27 Silence more signedness warnings 2023-06-14 19:51:31 +02:00
Grisly Glee
4202f8650d
Fix trivial signedness warnings (#15377)
* Fix trivial signedness warnings

* Followup on trivial signedness warnings
2023-06-14 04:43:11 +02:00
Subs
d9439b8166
CRT: fix aspect ratio for tate games on a horizontal screen (#15378) 2023-06-14 04:42:43 +02:00
libretroadmin
36cf7f00a8 Cleanups 2023-06-01 19:59:11 +02:00
libretroadmin
d1b9badf41 Rename common files to _defines.h 2023-05-31 22:46:34 +02:00
libretroadmin
696dae6e70 Refactor away some video driver functions 2023-05-31 01:09:38 +02:00
libretroadmin
3737b99b05 Cleanups 2023-05-30 22:10:03 +02:00
Colin Kinloch
402b381c9b Revert "(Wayland) Remove splash screen (#15178)"
This reverts commit f19def349f79a20355a2466006486222fb2ea2a1.
2023-05-29 19:16:21 +02:00
vanfanel
dd4148773d Create callback only when needed, and correct brace style. 2023-05-28 23:19:13 +02:00
vanfanel
155d2c9ada [Wayland+GL] Add frame callback after egl_swap_buffers to improve latency when max_swapchain<=2. 2023-05-28 23:19:13 +02:00
zoltanvb
e0a8d403f1 Support screen refresh rate with Vulkan KHR_Display context 2023-05-28 14:18:51 +02:00
zoltanvb
afa0e389aa Display server for KMS
Add a display server construct for DRM/KMS mode. The main use is
to provide resolution changes (including automatic refresh rate
switch) for this configuration, i.e. DRM context and OpenGL drivers.

To enable refresh rate restoration after automatic refresh rate
change, av_info->timing_fps is also adjusted on core close / RA exit.

No effects expected on CRTSwitchRes.
2023-05-19 17:34:25 +02:00
Eric Warmenhoven
22dc543364 tvOS has its own beautiful screensavers and I would like them 2023-05-10 22:00:23 +02:00
Colin Kinloch
f19def349f
(Wayland) Remove splash screen (#15178) 2023-04-10 16:37:48 +02:00