diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-02-24 23:11:21 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-02-24 23:11:21 +0000 |
commit | 527e121757a0e595bf47ba2f6aba4c02605806cb (patch) | |
tree | 395e0545e2ccd06e02a082adc520846fec98f3b9 /uisimulator/common | |
parent | 267eb0d00e8e71d88ef957ae5bfd8a69cae1ae0e (diff) | |
download | rockbox-527e121757a0e595bf47ba2f6aba4c02605806cb.tar.gz rockbox-527e121757a0e595bf47ba2f6aba4c02605806cb.zip |
Win32 simulator also needs open() option mangling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6050 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r-- | uisimulator/common/io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index f735c23a70..ee2ad6f14c 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c | |||
@@ -68,7 +68,7 @@ struct mydir { | |||
68 | 68 | ||
69 | typedef struct mydir MYDIR; | 69 | typedef struct mydir MYDIR; |
70 | 70 | ||
71 | #ifndef WIN32 | 71 | #if 1 /* maybe this needs disabling for MSVC... */ |
72 | static unsigned int rockbox2sim(int opt) | 72 | static unsigned int rockbox2sim(int opt) |
73 | { | 73 | { |
74 | int newopt = 0; | 74 | int newopt = 0; |
@@ -149,16 +149,14 @@ void sim_closedir(MYDIR *dir) | |||
149 | int sim_open(const char *name, int o) | 149 | int sim_open(const char *name, int o) |
150 | { | 150 | { |
151 | char buffer[256]; /* sufficiently big */ | 151 | char buffer[256]; /* sufficiently big */ |
152 | #ifndef WIN32 | ||
153 | int opts = rockbox2sim(o); | 152 | int opts = rockbox2sim(o); |
154 | #endif | ||
155 | 153 | ||
156 | if(name[0] == '/') { | 154 | if(name[0] == '/') { |
157 | sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); | 155 | sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); |
158 | 156 | ||
159 | debugf("We open the real file '%s'\n", buffer); | 157 | debugf("We open the real file '%s'\n", buffer); |
160 | #ifdef WIN32 | 158 | #ifdef WIN32 |
161 | return (open)(buffer, o); | 159 | return (open)(buffer, opts); |
162 | #else | 160 | #else |
163 | return (open)(buffer, opts, 0666); | 161 | return (open)(buffer, opts, 0666); |
164 | #endif | 162 | #endif |