Run all finish() methods even after failures

This commit is contained in:
Rodrigo Arias 2023-02-22 11:59:43 +01:00 committed by Rodrigo Arias Mallo
parent f640bc851e
commit c2064c125e

View File

@ -126,6 +126,7 @@ model_event(struct model *model, struct emu *emu, int index)
int int
model_finish(struct model *model, struct emu *emu) model_finish(struct model *model, struct emu *emu)
{ {
int ret = 0;
for (int i = 0; i < MAX_MODELS; i++) { for (int i = 0; i < MAX_MODELS; i++) {
if (!model->enabled[i]) if (!model->enabled[i])
continue; continue;
@ -136,8 +137,9 @@ model_finish(struct model *model, struct emu *emu)
if (spec->finish(emu) != 0) { if (spec->finish(emu) != 0) {
err("finish failed for model '%c'", (char) i); err("finish failed for model '%c'", (char) i);
return -1; ret = -1;
} }
} }
return 0;
return ret;
} }