Don't use stat() on Android
h/t Pere
This commit is contained in:
parent
e3f9e5a246
commit
e74cb54ccc
1 changed files with 6 additions and 0 deletions
|
|
@ -14356,16 +14356,20 @@ static SDL_Surface *load_starter_helper(char *path_and_basename,
|
|||
char fname[256];
|
||||
SDL_Surface *surf;
|
||||
unsigned int i;
|
||||
#ifndef __ANDROID__
|
||||
struct stat stat_buf;
|
||||
#endif
|
||||
|
||||
ext = strdup(extension);
|
||||
safe_snprintf(fname, sizeof(fname), "%s.%s", path_and_basename, ext);
|
||||
|
||||
#ifndef __ANDROID__
|
||||
if (stat(fname, &stat_buf) != 0)
|
||||
{
|
||||
/* File by that name doesn't exist; give up now */
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
surf = (*load_func) (fname);
|
||||
|
||||
|
|
@ -21733,6 +21737,7 @@ static SDL_Surface *myIMG_Load_RWops(const char *file)
|
|||
otherwise call SDL_Image lib's IMG_Load() (for PNGs, JPEGs, BMPs, etc.) */
|
||||
static SDL_Surface *myIMG_Load(const char *file)
|
||||
{
|
||||
#ifndef __ANDROID__
|
||||
struct stat stat_buf;
|
||||
|
||||
if (stat(file, &stat_buf) != 0)
|
||||
|
|
@ -21740,6 +21745,7 @@ static SDL_Surface *myIMG_Load(const char *file)
|
|||
/* File by that name doesn't exist; give up now */
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (strlen(file) > 4 && strcasecmp(file + strlen(file) - 4, ".kpx") == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue