Do not discard framebuffers unless options relevant to the resolution are changed. (#31)

* Do not discard framebuffers unless options relevant to the resolution are changed.

* Change comment.
This commit is contained in:
Darío
2025-12-29 18:29:22 -03:00
committed by GitHub
parent ae4c84d608
commit 2e675d5865
+7 -2
View File
@@ -346,9 +346,14 @@ bool banjo::renderer::RT64Context::update_config(const ultramodern::renderer::Gr
set_application_user_config(app.get(), new_config);
app->updateUserConfig(true);
// When updating the user configuration, only discard framebuffers if an option was changed that affects the resolution.
bool resolution_changed = new_config.res_option != old_config.res_option;
bool aspect_ratio_changed = new_config.ar_option != old_config.ar_option;
bool downsampling_changed = new_config.ds_option != old_config.ds_option;
bool msaa_changed = new_config.msaa_option != old_config.msaa_option;
app->updateUserConfig(resolution_changed || aspect_ratio_changed || downsampling_changed || msaa_changed);
if (new_config.msaa_option != old_config.msaa_option) {
if (msaa_changed) {
app->updateMultisampling();
}
return true;