summaryrefslogtreecommitdiff
path: root/src/video/sdl_v.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-06 21:11:44 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-27 13:19:25 +0100
commitf3326d34e78bd28fba6d8cfd3bc455a506b429fe (patch)
tree307a0608a7fb1c211fd72a8b8326cfe9bb1d37a2 /src/video/sdl_v.cpp
parent0c6e8a8123c9f74db757272f73adcbd8621e012d (diff)
downloadopenttd-f3326d34e78bd28fba6d8cfd3bc455a506b429fe.tar.xz
Codechange: Use std::string in FIO search path handling.
Diffstat (limited to 'src/video/sdl_v.cpp')
-rw-r--r--src/video/sdl_v.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 98777a87d..4f5167335 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -266,10 +266,10 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
- char icon_path[MAX_PATH];
- if (FioFindFullPath(icon_path, lastof(icon_path), BASESET_DIR, "openttd.32.bmp") != nullptr) {
+ std::string icon_path = FioFindFullPath(BASESET_DIR, "openttd.32.bmp");
+ if (!icon_path.empty()) {
/* Give the application an icon */
- icon = SDL_LoadBMP(icon_path);
+ icon = SDL_LoadBMP(icon_path.c_str());
if (icon != nullptr) {
/* Get the colourkey, which will be magenta */
uint32 rgbmap = SDL_MapRGB(icon->format, 255, 0, 255);