comparison 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
comparison
equal deleted inserted replaced
791:60686f8d5e48 792:724bbec47f86
280 { 280 {
281 wait_time *= mclks_sample; 281 wait_time *= mclks_sample;
282 wait(&y_context, &p_context, &current_cycle, wait_time); 282 wait(&y_context, &p_context, &current_cycle, wait_time);
283 } 283 }
284 } else { 284 } else {
285 printf("unimplemented command: %X at offset %X\n", cmd, (unsigned int)(cur - data - 1)); 285 fatal_error("unimplemented command: %X at offset %X\n", cmd, (unsigned int)(cur - data - 1));
286 exit(1);
287 } 286 }
288 } 287 }
289 } 288 }
290 return 0; 289 return 0;
291 } 290 }