src/file/SDL_rwops.c
changeset 8316 88f011703f39
parent 6430 48d519500f7e
child 8317 4eec049a8b7c
equal deleted inserted replaced
8315:76c317e41b53 8316:88f011703f39
   454 
   454 
   455 #elif HAVE_STDIO_H
   455 #elif HAVE_STDIO_H
   456     {
   456     {
   457     	#ifdef __APPLE__
   457     	#ifdef __APPLE__
   458     	FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
   458     	FILE *fp = SDL_OpenFPFromBundleOrFallback(file, mode);
       
   459         #elif __WINRT__
       
   460         FILE *fp = NULL;
       
   461         fopen_s(&fp, file, mode);
   459         #else
   462         #else
   460     	FILE *fp = fopen(file, mode);
   463     	FILE *fp = fopen(file, mode);
   461     	#endif
   464     	#endif
   462     	if (fp == NULL) {
   465     	if (fp == NULL) {
   463             SDL_SetError("Couldn't open %s", file);
   466             SDL_SetError("Couldn't open %s", file);
   464         } else {
   467         } else {
   465             rwops = SDL_RWFromFP(fp, 1);
   468             rwops = SDL_RWFromFP(fp, SDL_TRUE);
   466         }
   469         }
   467     }
   470     }
   468 #else
   471 #else
   469     SDL_SetError("SDL not compiled with stdio support");
   472     SDL_SetError("SDL not compiled with stdio support");
   470 #endif /* !HAVE_STDIO_H */
   473 #endif /* !HAVE_STDIO_H */