mirror of https://github.com/mgba-emu/mgba.git
GB Video: Fix SGB video logs
This commit is contained in:
parent
13c36a54f1
commit
7918b5af45
1
CHANGES
1
CHANGES
|
@ -58,6 +58,7 @@ Other fixes:
|
|||
- Debugger: Close trace log when done tracing
|
||||
- FFmpeg: Fix some small memory leaks
|
||||
- FFmpeg: Fix encoding of time base
|
||||
- GB Video: Fix SGB video logs
|
||||
- mGUI: Don't attempt to preload files larger than can fit in RAM
|
||||
- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642)
|
||||
- Qt: Fix static compilation in MinGW (fixes mgba.io/i/1769)
|
||||
|
|
|
@ -437,6 +437,9 @@ struct GBSerializedState {
|
|||
bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state);
|
||||
void GBSerialize(struct GB* gb, struct GBSerializedState* state);
|
||||
|
||||
void GBSGBSerialize(struct GB* gb, struct GBSerializedState* state);
|
||||
void GBSGBDeserialize(struct GB* gb, const struct GBSerializedState* state);
|
||||
|
||||
CXX_GUARD_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1163,6 +1163,9 @@ static bool _GBVLPLoadState(struct mCore* core, const void* buffer) {
|
|||
GBVideoDeserialize(&gb->video, state);
|
||||
GBIODeserialize(gb, state);
|
||||
GBAudioReset(&gb->audio);
|
||||
if (gb->model & GB_MODEL_SGB) {
|
||||
GBSGBDeserialize(gb, state);
|
||||
}
|
||||
|
||||
// Make sure CPU loop never spins
|
||||
gb->memory.ie = 0;
|
||||
|
|
|
@ -102,6 +102,12 @@ void GBVideoProxyRendererShim(struct GBVideo* video, struct GBVideoProxyRenderer
|
|||
renderer->backend = video->renderer;
|
||||
video->renderer = &renderer->d;
|
||||
renderer->d.cache = renderer->backend->cache;
|
||||
renderer->d.sgbRenderMode = renderer->backend->sgbRenderMode;
|
||||
renderer->d.sgbCharRam = renderer->backend->sgbCharRam;
|
||||
renderer->d.sgbMapRam = renderer->backend->sgbMapRam;
|
||||
renderer->d.sgbPalRam = renderer->backend->sgbPalRam;
|
||||
renderer->d.sgbAttributeFiles = renderer->backend->sgbAttributeFiles;
|
||||
renderer->d.sgbAttributes = renderer->backend->sgbAttributes;
|
||||
renderer->d.vram = video->vram;
|
||||
renderer->d.oam = &video->oam;
|
||||
_init(renderer);
|
||||
|
|
|
@ -16,9 +16,6 @@ mLOG_DEFINE_CATEGORY(GB_STATE, "GB Savestate", "gb.serialize");
|
|||
const uint32_t GB_SAVESTATE_MAGIC = 0x00400000;
|
||||
const uint32_t GB_SAVESTATE_VERSION = 0x00000002;
|
||||
|
||||
static void GBSGBSerialize(struct GB* gb, struct GBSerializedState* state);
|
||||
static void GBSGBDeserialize(struct GB* gb, const struct GBSerializedState* state);
|
||||
|
||||
void GBSerialize(struct GB* gb, struct GBSerializedState* state) {
|
||||
STORE_32LE(GB_SAVESTATE_MAGIC + GB_SAVESTATE_VERSION, 0, &state->versionMagic);
|
||||
STORE_32LE(gb->romCrc32, 0, &state->romCrc32);
|
||||
|
|
Loading…
Reference in New Issue