GB Serialize: Re-enable border toggling
Vicki Pfau vi@endrift.com
Tue, 28 Aug 2018 15:43:45 -0700
3 files changed,
4 insertions(+),
5 deletions(-)
M
src/gb/serialize.c
→
src/gb/serialize.c
@@ -173,17 +173,12 @@ if (GBSerializedCpuFlagsIsEiPending(flags)) {
mTimingSchedule(&gb->timing, &gb->eiPending, when); } - enum GBModel oldModel = gb->model; gb->model = state->model; if (gb->model < GB_MODEL_CGB) { gb->audio.style = GB_AUDIO_DMG; } else { gb->audio.style = GB_AUDIO_CGB; - } - - if (gb->model != GB_MODEL_SGB || oldModel != GB_MODEL_SGB) { - gb->video.sgbBorders = false; } GBMemoryDeserialize(gb, state);@@ -235,6 +230,7 @@ }
if (gb->video.renderer->sgbAttributes) { memcpy(state->sgb.attributes, gb->video.renderer->sgbAttributes, sizeof(state->sgb.attributes)); } + gb->video.renderer->enableSGBBorder(gb->video.renderer, gb->video.sgbBorders); } void GBSGBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -848,6 +848,7 @@
if (m_controller) { m_display->setMinimumSize(m_controller->screenDimensions()); connect(m_controller.get(), &CoreController::stopping, m_display.get(), &Display::stopDrawing); + connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::resizeContext); connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::forceDraw); connect(m_controller.get(), &CoreController::rewound, m_display.get(), &Display::forceDraw); connect(m_controller.get(), &CoreController::paused, m_display.get(), &Display::pauseDrawing);@@ -1871,6 +1872,7 @@ emit paused(false);
}); connect(m_controller.get(), &CoreController::stopping, m_display.get(), &Display::stopDrawing); + connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::resizeContext); connect(m_controller.get(), &CoreController::stateLoaded, m_display.get(), &Display::forceDraw); connect(m_controller.get(), &CoreController::rewound, m_display.get(), &Display::forceDraw); connect(m_controller.get(), &CoreController::paused, m_display.get(), &Display::pauseDrawing);
M
src/platform/sdl/gl-sdl.c
→
src/platform/sdl/gl-sdl.c
@@ -61,6 +61,7 @@ renderer->player.windowUpdated = 0;
} #endif } + renderer->core->desiredVideoDimensions(renderer->core, &renderer->width, &renderer->height); if (renderer->width != v->width || renderer->height != v->height) { renderer->core->setVideoBuffer(renderer->core, renderer->outputBuffer, renderer->width); v->setDimensions(v, renderer->width, renderer->height);