diff sms.c @ 1936:2c1c88cd1a3f mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sun, 19 Apr 2020 00:59:09 -0700
parents 374a5ae694e8 b387f1c5a1d0
children a7b753e260a2
line wrap: on
line diff
--- a/sms.c	Sat Apr 18 11:42:53 2020 -0700
+++ b/sms.c	Sun Apr 19 00:59:09 2020 -0700
@@ -430,22 +430,22 @@
 			target_cycle -= adjust;
 		}
 	}
-#ifndef IS_LIB
-	bindings_release_capture();
-	vdp_release_framebuffer(sms->vdp);
-	render_pause_source(sms->psg->audio);
-#endif
+	if (render_should_release_on_exit()) {
+		bindings_release_capture();
+		vdp_release_framebuffer(sms->vdp);
+		render_pause_source(sms->psg->audio);
+	}
 	sms->should_return = 0;
 }
 
 static void resume_sms(system_header *system)
 {
 	sms_context *sms = (sms_context *)system;
-#ifndef IS_LIB
-	bindings_reacquire_capture();
-	vdp_reacquire_framebuffer(sms->vdp);
-	render_resume_source(sms->psg->audio);
-#endif
+	if (render_should_release_on_exit()) {
+		bindings_reacquire_capture();
+		vdp_reacquire_framebuffer(sms->vdp);
+		render_resume_source(sms->psg->audio);
+	}
 	run_sms(system);
 }