mirror of https://github.com/mgba-emu/mgba.git
GB Serialize: Re-enable border toggling
This commit is contained in:
parent
7cc09c713b
commit
2c6715d78f
|
@ -173,7 +173,6 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
||||||
mTimingSchedule(&gb->timing, &gb->eiPending, when);
|
mTimingSchedule(&gb->timing, &gb->eiPending, when);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum GBModel oldModel = gb->model;
|
|
||||||
gb->model = state->model;
|
gb->model = state->model;
|
||||||
|
|
||||||
if (gb->model < GB_MODEL_CGB) {
|
if (gb->model < GB_MODEL_CGB) {
|
||||||
|
@ -182,10 +181,6 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
||||||
gb->audio.style = GB_AUDIO_CGB;
|
gb->audio.style = GB_AUDIO_CGB;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gb->model != GB_MODEL_SGB || oldModel != GB_MODEL_SGB) {
|
|
||||||
gb->video.sgbBorders = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
GBMemoryDeserialize(gb, state);
|
GBMemoryDeserialize(gb, state);
|
||||||
GBVideoDeserialize(&gb->video, state);
|
GBVideoDeserialize(&gb->video, state);
|
||||||
GBIODeserialize(gb, state);
|
GBIODeserialize(gb, state);
|
||||||
|
@ -235,6 +230,7 @@ void GBSGBSerialize(struct GB* gb, struct GBSerializedState* state) {
|
||||||
if (gb->video.renderer->sgbAttributes) {
|
if (gb->video.renderer->sgbAttributes) {
|
||||||
memcpy(state->sgb.attributes, gb->video.renderer->sgbAttributes, sizeof(state->sgb.attributes));
|
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) {
|
void GBSGBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
||||||
|
|
|
@ -848,6 +848,7 @@ void Window::reloadDisplayDriver() {
|
||||||
if (m_controller) {
|
if (m_controller) {
|
||||||
m_display->setMinimumSize(m_controller->screenDimensions());
|
m_display->setMinimumSize(m_controller->screenDimensions());
|
||||||
connect(m_controller.get(), &CoreController::stopping, m_display.get(), &Display::stopDrawing);
|
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::stateLoaded, m_display.get(), &Display::forceDraw);
|
||||||
connect(m_controller.get(), &CoreController::rewound, 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);
|
connect(m_controller.get(), &CoreController::paused, m_display.get(), &Display::pauseDrawing);
|
||||||
|
@ -1871,6 +1872,7 @@ void Window::setController(CoreController* controller, const QString& fname) {
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_controller.get(), &CoreController::stopping, m_display.get(), &Display::stopDrawing);
|
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::stateLoaded, m_display.get(), &Display::forceDraw);
|
||||||
connect(m_controller.get(), &CoreController::rewound, 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);
|
connect(m_controller.get(), &CoreController::paused, m_display.get(), &Display::pauseDrawing);
|
||||||
|
|
|
@ -61,6 +61,7 @@ void mSDLGLRunloop(struct mSDLRenderer* renderer, void* user) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
renderer->core->desiredVideoDimensions(renderer->core, &renderer->width, &renderer->height);
|
||||||
if (renderer->width != v->width || renderer->height != v->height) {
|
if (renderer->width != v->width || renderer->height != v->height) {
|
||||||
renderer->core->setVideoBuffer(renderer->core, renderer->outputBuffer, renderer->width);
|
renderer->core->setVideoBuffer(renderer->core, renderer->outputBuffer, renderer->width);
|
||||||
v->setDimensions(v, renderer->width, renderer->height);
|
v->setDimensions(v, renderer->width, renderer->height);
|
||||||
|
|
Loading…
Reference in New Issue