刘皓
c802e24f1b
Fix WASI file descriptor deserialization bugs in libretro builds
2025-05-28 17:07:22 -04:00
刘皓
b664b3c8c7
Disconnect dispose watches before deserializing save states in libretro builds
2025-05-28 16:01:32 -04:00
刘皓
6f472fb732
Handle disposal when deserializing save states in libretro builds
2025-05-28 15:32:43 -04:00
刘皓
1f5d90822c
Remove designated initializers
...
Apparently these are not valid until C++20.
2025-05-27 21:28:29 -04:00
刘皓
ede42dbb1b
Fix serialization of Tilemap::Autotiles
and TilemapVX::BitmapArray
in libretro builds, for real this time
2025-05-27 19:11:58 -04:00
刘皓
002b66d167
Fix serialization of Tilemap::Autotiles
and TilemapVX::BitmapArray
in libretro builds
2025-05-27 17:22:31 -04:00
刘皓
8ca753d85d
Continue implementing save state deserialization in libretro builds
2025-05-27 16:59:41 -04:00
刘皓
290ce15875
Fix typos in binding-sandbox/sandbox-serial-util.h
2025-05-26 21:29:10 -04:00
刘皓
d383889d4e
Start implementing save state deserialization in libretro builds
2025-05-25 16:07:40 -04:00
刘皓
c8dc6792b2
Improve pointer deserialization utilities in libretro builds
2025-05-25 14:58:59 -04:00
刘皓
cf11a0ed14
Also change void *&
to const void *&
in sandbox_serialize_member_declaration
2025-05-25 12:39:04 -04:00
刘皓
85b3340ea0
Actually remember to serialize the memory size in libretro builds
2025-05-25 10:19:13 -04:00
刘皓
58e3ec2035
Change second argument of sandbox_deserialize
from void *&
to const void *&
2025-05-25 09:33:12 -04:00
刘皓
7558f3fbcb
Add utilities for deserializing save states in libretro builds
2025-05-24 22:16:26 -04:00
刘皓
bc0bd7fe65
Make some small improvements to save state serialization in libretro builds
2025-05-24 19:19:57 -04:00
刘皓
b1ba7e1606
Fix coroutine state being changed on read in libretro builds
2025-05-24 17:05:11 -04:00
刘皓
0b27c24bd5
Implement save state serialization for stack pointer and Asyncify state/data in libretro builds
2025-05-24 13:25:40 -04:00
刘皓
f9aeef915f
Fix type of mkxp_sandbox_cwd
in libretro/ruby-bindings.h
2025-05-24 10:11:21 -04:00
刘皓
e957af931c
Implement save state serialization for WASI file descriptors in libretro builds
2025-05-23 23:59:29 -04:00
刘皓
057b6dc95d
Serialize the path of the currently playing movie in libretro builds
2025-05-23 12:06:03 -04:00
刘皓
1b0757c5db
Fix save state serialization of bitmaps in libretro builds
2025-05-23 10:09:03 -04:00
刘皓
e137548de4
Implement save state serialization for Graphics.play_movie
in libretro builds
2025-05-22 22:08:55 -04:00
刘皓
68d327d265
Implement save state serialization for sandbox state in libretro builds
2025-05-22 21:44:00 -04:00
刘皓
01ff2ec75a
Apply some small fixes to save state serialization in libretro builds
2025-05-22 19:20:28 -04:00
刘皓
bff931ce94
Fix linker error in bitmap.cpp in libretro 3DS build
2025-05-22 15:26:26 -04:00
刘皓
941e0e1cef
Fix linker error in binding-sandbox/sandbox-serial-util.h on some platforms
2025-05-22 13:35:58 -04:00
刘皓
2896ec5abd
Implement save state serialization for C++ objects owned by the bindings in libretro builds
2025-05-22 12:49:01 -04:00
刘皓
4561a0b0f8
Fix edge case in set_private_data
in libretro builds
2025-05-20 19:16:20 -04:00
刘皓
551206e7b4
Don't set private data if an exception has occurred in the bindings
2025-05-20 18:58:44 -04:00
刘皓
39567dd0ea
Add fiber stack indices into libretro save state
2025-05-20 18:34:55 -04:00
刘皓
80b3833fff
Start implementing save state serialization in libretro builds
2025-05-20 17:42:35 -04:00
刘皓
b8fb59e558
Make sure stack_index
is initialized in binding-sandbox/binding-base.h
...
This field needs to be initialized when `struct frame` is constructed,
or its value may be random.
I also changed the type of `stack_index` to `wasm_size_t` so that it's
the same size on every platform.
2025-05-20 15:51:50 -04:00
刘皓
ecfaa4eebf
Add a safety check to mkxp_sandbox::binding_base::object::~object()
2025-05-19 21:14:50 -04:00
刘皓
cd628048ef
Store destructors in a global table instead of in the object itself in libretro builds
2025-05-19 19:27:30 -04:00
刘皓
16e701fc7c
Rearrange typenums in binding-sandbox/binding-util.h in lexicographic order
2025-05-19 16:19:57 -04:00
刘皓
1d88c068fb
Fix libretro PlayStation 3 compilation error in binding-sandbox/binding-base.cpp
2025-05-19 15:48:06 -04:00
刘皓
5f06028aa8
Merge branch 'misc-fixes' into libretro
2025-05-19 15:18:30 -04:00
刘皓
09ec1db6f4
Fix race condition in Movie
destructor
2025-05-19 15:16:34 -04:00
刘皓
031245491f
Keep track of all C++ objects allocated by bindings in libretro builds
...
This commit adds `sb()->create_object()`, `sb()->get_object()`,
`sb()->check_object_type()` and `sb()->destroy_object()` in libretro
builds to keep track of all C++ objects allocated by the bindings in
libretro builds. This has some benefits:
* Any C++ objects allocated by the bindings that are still alive when
the game terminates can now be deallocated instead of being leaked
like before.
* We now keep track of the types of all objects allocated by the
bindings, so we will be able to detect when the bindings attempt to
access objects of mismatching type.
* Keeping track of all allocated objects is required to implement
libretro save states.
* Objects are now kept track of using numeric keys whose sizes are the
same on every platform rather than pointers, which helps with making
save states portable across platforms.
2025-05-19 14:44:44 -04:00
刘皓
01bc2d71fe
Use the correct core filename suffixes in libretro autobuilds
2025-05-18 22:33:11 -04:00
刘皓
6e41620c81
Fix confusion of class
and struct
in bitmap.h
2025-05-18 20:04:22 -04:00
刘皓
5b5ffd6f18
Handle game shutdown properly in libretro builds
2025-05-18 10:03:08 -04:00
刘皓
ef58df103a
Remember to actually initialize exception classes in libretro builds
2025-05-18 09:42:42 -04:00
刘皓
4709ea48ce
Merge branch 'libretro-no-exceptions' into libretro
2025-05-17 23:22:25 -04:00
刘皓
367a2a5949
Remove unused guardDisposed()
functions from font.cpp and graphics.cpp
2025-05-17 23:04:50 -04:00
刘皓
79199ccd7a
Allow json5pp to report syntax errors and bad casts even with -fno-exceptions
2025-05-17 22:57:31 -04:00
刘皓
83a6b7a1f1
Re-add missing GFX_LOCK
/GFX_UNLOCK
calls in binding-sandbox
2025-05-17 19:41:43 -04:00
刘皓
c18e7e28a3
Fix free
being called on null pointer in Graphics.snap_to_bitmap
in standalone builds
2025-05-17 18:20:17 -04:00
刘皓
2f589e1cf4
Fix compilation errors in binding/ in standalone builds
2025-05-17 17:21:51 -04:00
刘皓
aef7eff511
Fix some compilation errors in standalone builds
2025-05-17 13:03:57 -04:00