comparison blastem.c @ 2658:99297d5f4c5d

Persist save states and config in emscripten build via IDBFS module
author Michael Pavone <pavone@retrodev.com>
date Tue, 04 Mar 2025 00:05:12 -0800
parents c30e5548154f
children
comparison
equal deleted inserted replaced
2657:d1f689ed3956 2658:99297d5f4c5d
157 { 157 {
158 static uint8_t system_started; 158 static uint8_t system_started;
159 #ifndef DISABLE_NUKLEAR 159 #ifndef DISABLE_NUKLEAR
160 static uint8_t was_menu; 160 static uint8_t was_menu;
161 if (use_nuklear) { 161 if (use_nuklear) {
162 if (menu && !was_menu) {
163 ui_enter();
164 } else if (!menu && was_menu) {
165 ui_exit();
166 }
167 if (menu) { 162 if (menu) {
163 if (!was_menu) {
164 ui_enter();
165 }
166 was_menu = menu;
168 render_update_display(); 167 render_update_display();
168 menu = !get_content_binding_state();
169 if (!menu) {
170 ui_exit();
171 return;
172 }
173 } else {
174 was_menu = menu;
169 } 175 }
170 } 176 }
171 #endif 177 #endif
172 if (!current_system && game_system) { 178 if (!current_system && game_system) {
173 current_system = game_system; 179 current_system = game_system;
174 menu = 0;
175 #ifndef DISABLE_NUKLEAR
176 was_menu = 0;
177 ui_exit();
178 #endif
179 } 180 }
180 if (current_system) { 181 if (current_system) {
181 if (system_started && render_is_audio_sync()) { 182 if (system_started && !current_system->force_release && render_is_audio_sync()) {
182 if (all_sources_ready()) { 183 if (all_sources_ready()) {
183 return; 184 return;
184 } 185 }
185 } 186 }
186 if (current_system->next_rom) { 187 if (current_system->next_rom) {