刘皓
b55f6dd1f4
Add more error checking to sandbox bindings
...
* Added checks for when an incorrect number of arguments is passed to a
function
* Added checks for when an argument of object type has mismatching type
(arguments of numeric and string types were already checked for type
mismatches before this commit)
* Added checks for trying to read certain properties of a disposed
object
2025-08-18 14:04:09 -04:00
刘皓
0307f2ed18
Explicitly cast integers before passing to log_printf
in wasm-rt.cpp
2025-08-18 11:13:53 -04:00
刘皓
643a6bc14f
Properly catch exceptions in Graphics.update
in libretro builds
2025-08-18 11:02:54 -04:00
刘皓
583ddfb45d
Enable bulk memory operations in stage 1 of libretro builds
2025-08-14 11:47:30 -04:00
刘皓
dc741f455f
Fix crash when performing zero-length vectored file operations in libretro builds
2025-08-13 09:49:54 -04:00
刘皓
7b6f625e89
Fix some compiler warnings in libretro builds
2025-08-10 11:37:19 -04:00
刘皓
19fe3f955d
Add bounds checking to operations involving arrays in sandbox memory
2025-08-10 11:27:39 -04:00
刘皓
ae0e1bd6d5
Serialize screen size and window size separately in libretro save states
2025-08-10 10:43:26 -04:00
刘皓
0fb327c93e
Make Exception::what()
thread-safe
2025-08-10 10:01:02 -04:00
刘皓
8e85e59ed8
Merge branch 'misc-fixes' into libretro
2025-08-08 11:42:59 -04:00
刘皓
8d84ac0d11
Fix undefined behaviour in Encoding::convertString()
...
Writing to the pointer returned by calling `.c_str()` on a string is
undefined behaviour.
2025-08-08 11:32:31 -04:00
刘皓
a872183542
Guard against writing to out-of-bounds memory in Bitmap::drawTextInner()
2025-08-08 11:05:26 -04:00
刘皓
d575c92b2e
Make it easier to change the number of wasm2c outputs in libretro/Makefile
2025-08-08 10:21:57 -04:00
刘皓
f23397f4b1
Fix edge case in wasm2c patch
2025-08-08 09:17:07 -04:00
刘皓
5a0630f015
Patch wasm2c to evenly distribute the data segments
...
This prevents the TOC (table of contents) on PowerPC targets from being
overflowed by the sizes of the files generated by wasm2c. It should also
help improve compilation times. I'll be submitting this patch as a pull
request to WABT later.
2025-08-06 14:34:03 -04:00
刘皓
49c4b8f41d
Correct a comment in bitmap.cpp describing what license SDL_ttf uses
2025-08-04 19:11:08 -04:00
刘皓
cf34d9d464
Implement bold and italic font rendering in libretro builds
2025-08-02 18:04:32 -04:00
刘皓
b16068e661
Fix detection logic for semaphore support in meson.build
2025-08-02 10:13:25 -04:00
刘皓
bb7ad15bb6
Don't try to use thin LTO with Emscripten since it isn't supported
2025-08-01 15:14:13 -04:00
刘皓
d31df2dead
Use Grand Central Dispatch semaphores instead of POSIX semaphores in libretro Darwin builds
...
POSIX semaphores are available in the standard library, but creation of
unnamed POSIX semaphores always fails, so they're basically useless for
our purposes.
2025-08-01 14:53:18 -04:00
刘皓
958ed895e3
Use thin LTO for some platforms where full LTO times out in libretro CI
2025-08-01 13:25:21 -04:00
刘皓
bec70a1555
Include file header at the top of stb_image.c, stb_image_malloc.h and stb_sprintf.c
2025-07-31 21:58:46 -04:00
刘皓
97812ac2fb
Don't allow stb_sprintf to use unaligned memory accesses since they're undefined behaviour
2025-07-31 21:37:48 -04:00
刘皓
9da4fc8540
Improve determination of size of stbsp__uintptr
in stb_sprintf
2025-07-31 21:36:25 -04:00
刘皓
917c3d735f
Fix namespace issues in mkxp-polyfill.h
2025-07-30 17:30:10 -04:00
刘皓
c52918eca1
Don't manually set compiler for x86_64 macOS in libretro CI
2025-07-29 13:23:31 -04:00
刘皓
2117a10778
Attempt again to fix libretro CI failure on x86_64 macOS
2025-07-29 12:48:08 -04:00
刘皓
863b5eaf5c
Attempt to fix libretro CI failure on x86_64 macOS
2025-07-29 12:28:22 -04:00
刘皓
9967999130
Lower Android API level for 32-bit libretro Android builds to 21
2025-07-29 12:21:08 -04:00
刘皓
67ae4e4ae5
Attempt to fix libretro CI failures
2025-07-29 12:01:56 -04:00
刘皓
92740a6371
Use --target
instead of -target
in CI
2025-07-29 11:19:15 -04:00
刘皓
daf4e26e43
Lower iOS version requirement for 64-bit ARM to iOS 10
2025-07-29 11:12:30 -04:00
刘皓
6cf62940f1
Explicitly set minimum OS version for libretro Darwin builds
...
The minimum OS version defaults to the latest version supported by the
SDK. That's not optimal if we want to support as many devices as
possible.
2025-07-29 11:08:55 -04:00
刘皓
b4db773b70
Use "none" instead of "bare" as Meson system name for console builds
2025-07-29 10:56:20 -04:00
刘皓
4ec7039c06
Fix a mistake in the previous commit
2025-07-28 23:32:12 -04:00
刘皓
e2be5b5d50
Fix libretro save state serialization of hires transition map
2025-07-28 23:11:29 -04:00
刘皓
c6e33a9ff1
Move sandbox coroutine destructors into an end()
method
...
Follow-up to 9b3240f7b3
.
This allows us to choose whether or not to run the destructor when
destroying the coroutines in a way that doesn't cause memory leaks.
2025-07-25 21:21:29 -04:00
刘皓
03a26a941c
Fix memory leak in stack frame destructors in libretro builds
...
We need to call `delete` on the coroutines to actually deallocate their
memory. Calling `->~T()` only runs the destructor without deallocating
the memory afterwards.
2025-07-25 20:40:39 -04:00
刘皓
9b3240f7b3
Revert "Don't run stack frame destructors when deserializing libretro save states"
...
This reverts commit 33153783e8
.
Not calling stack frame destructors would leak their memory, silly.
2025-07-25 20:38:20 -04:00
刘皓
fa05f440af
Only allow disposable objects to be marked as disposed in libretro save states
2025-07-25 11:51:58 -04:00
刘皓
33153783e8
Don't run stack frame destructors when deserializing libretro save states
2025-07-25 11:22:31 -04:00
刘皓
4ada800de3
Refactor libretro core initialization to not need RETRO_SERIALIZATION_QUIRK_MUST_INITIALIZE
...
This commit moves some of the initialization around so that the core can
handle save states immediately after initialization instead of needing
to run for one frame before save states will work.
2025-07-23 13:47:58 -04:00
刘皓
89c8879d9a
Fix sandbox VM stack pointer being corrupted when deserializing libretro save state
...
We need to make sure the stack pointer is deserialized *after* the stack
frames are deserialized, since deserializing the stack frames also
causes the stack pointer to change.
2025-07-23 13:44:55 -04:00
刘皓
c3ff94b85f
Revert "Serialize which Ruby fiber is currently active in libretro save states"
...
This reverts commit 7f0d5b3960
.
The currently active Ruby fiber is stored in the VM memory and not in
the VM globals, so this serialization is redundant.
2025-07-23 12:32:33 -04:00
刘皓
3f95daa61b
Fix typo in fluidsynth-mkxp-polyfill.patch
2025-07-23 10:56:37 -04:00
刘皓
717789dc4d
Add the current working directory as a Git safe directory in .gitlab-ci.yml
...
The code in meson.build for getting the current Git commit fails in some
of the container images due to permission issues. This should fix it.
2025-07-16 11:20:47 -04:00
刘皓
03b97c333b
Replace retro_hw_render_callback
with struct retro_hw_render_callback
in src/core.cpp
2025-07-16 11:20:27 -04:00
刘皓
dbc65b2679
Move dependency installation into before_script
section in .gitlab-ci.yml
2025-07-16 00:24:53 -04:00
刘皓
617c646b91
Fix typo in Makefile.libretro: build.ini should be build.ninja
2025-07-16 00:17:17 -04:00
刘皓
eb3765524e
Add clean target to Makefile.libretro
2025-07-16 00:15:22 -04:00