diff options
author | est31 <est31@users.noreply.github.com> | 2016-08-20 21:26:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-20 21:26:44 +0200 |
commit | f092dac9793b80c29a669b0d676ee3e4f55f682e (patch) | |
tree | 75bb3a5c4f9d82fc6c18f4481f3b8a662ea481c3 /src/porting.cpp | |
parent | 6590140260d0338ab5a0fd2bbcd4c72f07dd963d (diff) | |
download | hax-minetest-server-f092dac9793b80c29a669b0d676ee3e4f55f682e.tar.gz hax-minetest-server-f092dac9793b80c29a669b0d676ee3e4f55f682e.zip |
Also support X11 icon for minetest copies installed via make install (#4407)
Fixes #4323.
Diffstat (limited to 'src/porting.cpp')
-rw-r--r-- | src/porting.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/porting.cpp b/src/porting.cpp index acd047232..ae9114ac8 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -611,7 +611,24 @@ void setXorgClassHint(const video::SExposedVideoData &video_data, #endif } -bool setXorgWindowIcon(IrrlichtDevice *device, +bool setXorgWindowIcon(IrrlichtDevice *device) +{ +#if RUN_IN_PLACE + return setXorgWindowIconFromPath(device, + path_share + "/misc/" PROJECT_NAME "-xorg-icon-128.png"); +#else + // We have semi-support for reading in-place data if we are + // compiled with RUN_IN_PLACE. Don't break with this and + // also try the path_share location. + return + setXorgWindowIconFromPath(device, + ICON_DIR "/hicolor/128x128/apps/" PROJECT_NAME ".png") || + setXorgWindowIconFromPath(device, + path_share + "/misc/" PROJECT_NAME "-xorg-icon-128.png"); +#endif +} + +bool setXorgWindowIconFromPath(IrrlichtDevice *device, const std::string &icon_file) { #ifdef XORG_USED |