forked from len0rd/rockbox
Win32 simulator also needs open() option mangling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6050 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
267eb0d00e
commit
527e121757
1 changed files with 2 additions and 4 deletions
|
@ -68,7 +68,7 @@ struct mydir {
|
|||
|
||||
typedef struct mydir MYDIR;
|
||||
|
||||
#ifndef WIN32
|
||||
#if 1 /* maybe this needs disabling for MSVC... */
|
||||
static unsigned int rockbox2sim(int opt)
|
||||
{
|
||||
int newopt = 0;
|
||||
|
@ -149,16 +149,14 @@ void sim_closedir(MYDIR *dir)
|
|||
int sim_open(const char *name, int o)
|
||||
{
|
||||
char buffer[256]; /* sufficiently big */
|
||||
#ifndef WIN32
|
||||
int opts = rockbox2sim(o);
|
||||
#endif
|
||||
|
||||
if(name[0] == '/') {
|
||||
sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
|
||||
|
||||
debugf("We open the real file '%s'\n", buffer);
|
||||
#ifdef WIN32
|
||||
return (open)(buffer, o);
|
||||
return (open)(buffer, opts);
|
||||
#else
|
||||
return (open)(buffer, opts, 0666);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue