diff vgmplay.c @ 792:724bbec47f86

Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
author Michael Pavone <pavone@retrodev.com>
date Sat, 25 Jul 2015 18:22:07 -0700
parents 019d27995e32
children 9aff36a172b2
line wrap: on
line diff
--- a/vgmplay.c	Sat Jul 25 18:19:00 2015 -0700
+++ b/vgmplay.c	Sat Jul 25 18:22:07 2015 -0700
@@ -282,8 +282,7 @@
 					wait(&y_context, &p_context, &current_cycle, wait_time);
 				}
 			} else {
-				printf("unimplemented command: %X at offset %X\n", cmd, (unsigned int)(cur - data - 1));
-				exit(1);
+				fatal_error("unimplemented command: %X at offset %X\n", cmd, (unsigned int)(cur - data - 1));
 			}
 		}
 	}