0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 04:43:52 +01:00

when file is corrupted, also call the on_init

This commit is contained in:
2025-12-22 21:53:00 +01:00
parent ceae7ec6ce
commit 7dce2b6300
4 changed files with 11 additions and 7 deletions

View File

@@ -12,7 +12,10 @@ int lua_set_rds_program_defaults(lua_State *localL) {
int lua_reset_rds(lua_State *localL) {
(void)localL;
encoder_saveToFile(mod->enc);
if(encoder_saveToFile(mod->enc)) {
lua_set_rds_program_defaults(localL);
encoder_saveToFile(mod->enc)
}
encoder_loadFromFile(mod->enc);
for(int i = 0; i < PROGRAMS; i++) reset_rds_state(mod->enc, i);
Modulator_saveToFile(&mod->params);