Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
1a24b614
Commit
1a24b614
authored
May 08, 2010
by
Eric Wing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exempted writable modes from bundle check on OS X since bundle areas are typically read-only.
parent
a67b7bdc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
SDL_rwopsbundlesupport.m
src/file/cocoa/SDL_rwopsbundlesupport.m
+6
-0
Test_rwopsbundlesupport.m
test/automated/rwops/Test_rwopsbundlesupport.m
+6
-0
rwops.c
test/automated/rwops/rwops.c
+0
-2
No files found.
src/file/cocoa/SDL_rwopsbundlesupport.m
View file @
1a24b614
...
...
@@ -12,6 +12,12 @@ FILE* SDL_OpenFPFromBundleOrFallback(const char *file, const char *mode)
{
FILE
*
fp
=
NULL
;
//
If
the
file
mode
is
writable
,
skip
all
the
bundle
stuff
because
generally
the
bundle
is
read
-
only
.
if
(
strcmp
(
"r"
,
mode
)
&&
strcmp
(
"rb"
,
mode
))
{
return
fopen
(
file
,
mode
)
;
}
NSAutoreleasePool
*
autorelease
_
pool
=
[[
NSAutoreleasePool
alloc
]
init
]
;
...
...
test/automated/rwops/Test_rwopsbundlesupport.m
View file @
1a24b614
...
...
@@ -12,6 +12,12 @@ FILE* Test_OpenFPFromBundleOrFallback(const char *file, const char *mode)
{
FILE
*
fp
=
NULL
;
//
If
the
file
mode
is
writable
,
skip
all
the
bundle
stuff
because
generally
the
bundle
is
read
-
only
.
if
(
strcmp
(
"r"
,
mode
)
&&
strcmp
(
"rb"
,
mode
))
{
return
fopen
(
file
,
mode
)
;
}
NSAutoreleasePool
*
autorelease
_
pool
=
[[
NSAutoreleasePool
alloc
]
init
]
;
...
...
test/automated/rwops/rwops.c
View file @
1a24b614
...
...
@@ -227,7 +227,6 @@ static void rwops_testFP (void)
/* Run read tests. */
#if __APPLE__
/* Cheating: Using private API in SDL */
fp
=
Test_OpenFPFromBundleOrFallback
(
RWOPS_READ
,
"r"
);
#else
fp
=
fopen
(
RWOPS_READ
,
"r"
);
...
...
@@ -243,7 +242,6 @@ static void rwops_testFP (void)
/* Run write tests. */
#if __APPLE__
/* Cheating: Using private API in SDL */
fp
=
Test_OpenFPFromTemporaryDir
(
RWOPS_WRITE
,
"w+"
);
#else
fp
=
fopen
(
RWOPS_WRITE
,
"w+"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment