Skip to content

Commit 3895621

Browse files
committed
animation fixed for web simulator
1 parent 00d4335 commit 3895621

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/eez/modules/mcu/simulator/display.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -264,23 +264,23 @@ void animate() {
264264
}
265265

266266
void sync() {
267+
if (g_animationState.enabled) {
268+
animate();
269+
}
270+
271+
#ifdef __EMSCRIPTEN__
272+
if (g_animationState.enabled) {
273+
return;
274+
}
275+
#endif
276+
267277
if (isOn() && g_painted) {
268278
g_painted = false;
269279

270280
if (g_mainWindow == nullptr) {
271281
init();
272282
}
273283

274-
if (g_animationState.enabled) {
275-
animate();
276-
}
277-
278-
#ifdef __EMSCRIPTEN__
279-
if (g_animationState.enabled) {
280-
return;
281-
}
282-
#endif
283-
284284
updateScreen(g_frontPanelBuffer);
285285

286286
if (g_frontPanelBuffer == g_frontPanelBuffer1) {

0 commit comments

Comments
 (0)