mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-08-26 01:33:58 +02:00
v111.4
Serialization improvements.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -167,6 +168,20 @@ void co_switch(cothread_t handle) {
|
||||
co_swap(co_active_handle = handle, co_previous_handle);
|
||||
}
|
||||
|
||||
unsigned int co_size(unsigned int size) {
|
||||
size += 512;
|
||||
size &= ~15;
|
||||
return size;
|
||||
}
|
||||
|
||||
void co_save(cothread_t handle, void* memory, unsigned int size) {
|
||||
memcpy(memory, handle, size);
|
||||
}
|
||||
|
||||
void co_load(cothread_t handle, const void* memory, unsigned int size) {
|
||||
memcpy(handle, memory, size);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user