Skip to content

Commit 67a9ca3

Browse files
author
peter
committed
windows fix
1 parent 757dfa0 commit 67a9ca3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,12 @@ static void mmedia_run(const char *f)
239239
exit(1);
240240
}
241241
#else
242-
// todo
242+
static char cmd[512];
243+
if (!mmedia_bin || !mmedia_bin[0])
244+
return;
245+
snprintf(cmd, sizeof(cmd), "%s %s", mmedia_bin, f);
246+
/* not safe! but it is windows... */
247+
system(cmd);
243248
#endif
244249
}
245250

@@ -261,6 +266,8 @@ static void mmedia(int t)
261266
media[t] = mm;
262267
if (mm && *mm) { /* changed */
263268
printf("@ %s\n", mm);
269+
if (t == 0) /* we do not support composed images */
270+
mm[strcspn(mm, ";")] = 0;
264271
mmedia_run(mm);
265272
}
266273
}

0 commit comments

Comments
 (0)