diff options
Diffstat (limited to 'uisimulator/common/io.c')
-rw-r--r-- | uisimulator/common/io.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index e5b2f9228d..cb8064c7d7 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c | |||
@@ -54,6 +54,7 @@ struct mydir { | |||
54 | 54 | ||
55 | typedef struct mydir MYDIR; | 55 | typedef struct mydir MYDIR; |
56 | 56 | ||
57 | #ifndef WIN32 | ||
57 | static unsigned int rockbox2sim(int opt) | 58 | static unsigned int rockbox2sim(int opt) |
58 | { | 59 | { |
59 | int newopt = 0; | 60 | int newopt = 0; |
@@ -70,7 +71,7 @@ static unsigned int rockbox2sim(int opt) | |||
70 | 71 | ||
71 | return newopt; | 72 | return newopt; |
72 | } | 73 | } |
73 | 74 | #endif | |
74 | 75 | ||
75 | MYDIR *sim_opendir(const char *name) | 76 | MYDIR *sim_opendir(const char *name) |
76 | { | 77 | { |
@@ -132,14 +133,16 @@ void sim_closedir(MYDIR *dir) | |||
132 | int sim_open(const char *name, int o) | 133 | int sim_open(const char *name, int o) |
133 | { | 134 | { |
134 | char buffer[256]; /* sufficiently big */ | 135 | char buffer[256]; /* sufficiently big */ |
136 | #ifndef WIN32 | ||
135 | int opts = rockbox2sim(o); | 137 | int opts = rockbox2sim(o); |
138 | #endif | ||
136 | 139 | ||
137 | if(name[0] == '/') { | 140 | if(name[0] == '/') { |
138 | sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); | 141 | sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name); |
139 | 142 | ||
140 | debugf("We open the real file '%s'\n", buffer); | 143 | debugf("We open the real file '%s'\n", buffer); |
141 | #ifdef WIN32 | 144 | #ifdef WIN32 |
142 | return (open)(buffer, opts); | 145 | return (open)(buffer, o); |
143 | #else | 146 | #else |
144 | return (open)(buffer, opts, 0666); | 147 | return (open)(buffer, opts, 0666); |
145 | #endif | 148 | #endif |