summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opl/examples/droplay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/opl/examples/droplay.c b/opl/examples/droplay.c
index b1656815..4c2fc2f8 100644
--- a/opl/examples/droplay.c
+++ b/opl/examples/droplay.c
@@ -183,6 +183,12 @@ void PlayFile(char *filename)
timer_data.fstream = fopen(filename, "rb");
+ if (timer_data.fstream == NULL)
+ {
+ fprintf(stderr, "Failed to open %s\n", filename);
+ exit(-1);
+ }
+
if (fread(buf, 1, 8, timer_data.fstream) < 8)
{
fprintf(stderr, "failed to read raw OPL header\n");
@@ -226,7 +232,6 @@ int main(int argc, char *argv[])
Init();
ClearAllRegs();
- SDL_Delay(1000);
PlayFile(argv[1]);