diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-09-17 01:53:41 +0200 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-09-17 01:56:35 +0200 |
commit | e65b29e9f2a9a79731f38787384f9c877eec430f (patch) | |
tree | df729dca05bd679dccf7cc336974e4795099ce47 /crawl-ref/source/windowmanager-sdl.cc | |
parent | 0fac9b0ec9f22978b94594373d65c5a70a4441fd (diff) | |
download | crawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.tar.gz crawl-ref-e65b29e9f2a9a79731f38787384f9c877eec430f.zip |
Handle filenames with non-ascii characters.
Only iostreams functions are left; on Windows they don't support Unicode
so a workaround will be needed.
Diffstat (limited to 'crawl-ref/source/windowmanager-sdl.cc')
-rw-r--r-- | crawl-ref/source/windowmanager-sdl.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/windowmanager-sdl.cc b/crawl-ref/source/windowmanager-sdl.cc index b2104b1278..2dbe497b59 100644 --- a/crawl-ref/source/windowmanager-sdl.cc +++ b/crawl-ref/source/windowmanager-sdl.cc @@ -12,6 +12,7 @@ #include "files.h" #include "glwrapper.h" #include "options.h" +#include "syscalls.h" #include "windowmanager.h" WindowManager *wm = NULL; @@ -724,7 +725,7 @@ int SDLWrapper::byte_order() SDL_Surface *SDLWrapper::load_image(const char *file) const { SDL_Surface *surf = NULL; - FILE *imgfile = fopen(file, "rb"); + FILE *imgfile = fopen_u(file, "rb"); if (imgfile) { SDL_RWops *rw = SDL_RWFromFP(imgfile, 0); |