summaryrefslogtreecommitdiff
path: root/apps/plugins/doom
diff options
context:
space:
mode:
authorNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-09 18:44:07 +0000
committerNicolas Pennequin <nicolas.pennequin@free.fr>2007-10-09 18:44:07 +0000
commit9ff40579c383972ab4274013338e2d211084c10d (patch)
treea810c4b4a2096dcb0d14a364f4249fe102f51f1a /apps/plugins/doom
parentb24631c07fb30b74717dce709b7736d661e7d442 (diff)
Hopefully the last fix for crosscompilation of sims with mingw32.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15048 a1c6a512-1295-4272-9138-f99709370657
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))