summaryrefslogtreecommitdiff
path: root/apps/plugins/doom
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom')
-rw-r--r--apps/plugins/doom/rockdoom.c4
-rw-r--r--apps/plugins/doom/rockmacros.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c
index 104d3227f6..c0ff83e9a6 100644
--- a/apps/plugins/doom/rockdoom.c
+++ b/apps/plugins/doom/rockdoom.c
@@ -755,7 +755,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
printf("There were still: %d files open\n", fpoint);
while(fpoint>0)
{
+#ifdef SIMULATOR
+ close(filearray[fpoint]);
+#else
rb->close(filearray[fpoint]);
+#endif
fpoint--;
}
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h
index b73c965c92..2ddbb94fcf 100644
--- a/apps/plugins/doom/rockmacros.h
+++ b/apps/plugins/doom/rockmacros.h
@@ -41,11 +41,13 @@ char *my_strtok( char * s, const char * delim );
#ifdef SIMULATOR
#undef open
+#undef close
#undef lseek
#undef filesize
#undef read
#undef write
#define open(a,b) rb->sim_open((a),(b))
+#define close(a) rb->sim_close((a))
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
#define filesize(a) rb->sim_filesize((a))
#define read(a,b,c) rb->sim_read((a),(b),(c))