summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tiletex.cc
diff options
context:
space:
mode:
authorEnne Walker <ennewalker@users.sourceforge.net>2010-02-28 16:11:35 -0500
committerEnne Walker <ennewalker@users.sourceforge.net>2010-02-28 16:11:35 -0500
commit59508909b02a40ef223d768141ca9947cbe92d68 (patch)
tree27c2e51935165a10f95d14892e503f0de5ad828d /crawl-ref/source/tiletex.cc
parentcba1b3d1064e7e77a878ad6226817ad13c3bd282 (diff)
downloadcrawl-ref-59508909b02a40ef223d768141ca9947cbe92d68.tar.gz
crawl-ref-59508909b02a40ef223d768141ca9947cbe92d68.zip
[941] Fix tiles issue with umlauts in the path.
Diffstat (limited to 'crawl-ref/source/tiletex.cc')
-rw-r--r--crawl-ref/source/tiletex.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/tiletex.cc b/crawl-ref/source/tiletex.cc
index 804408ec0d..a3169cb7c4 100644
--- a/crawl-ref/source/tiletex.cc
+++ b/crawl-ref/source/tiletex.cc
@@ -46,7 +46,18 @@ bool GenericTexture::load_texture(const char *filename,
return (false);
}
- SDL_Surface *img = IMG_Load(tex_path.c_str());
+ SDL_Surface *img = NULL;
+ FILE *imgfile = fopen(tex_path.c_str(), "rb");
+ if (imgfile)
+ {
+ SDL_RWops *rw = SDL_RWFromFP(imgfile, 0);
+ if (rw)
+ {
+ img = IMG_Load_RW(rw, 0);
+ SDL_RWclose(rw);
+ }
+ fclose(imgfile);
+ }
if (!img)
{