mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Fix #34
This commit is contained in:
parent
39c970b8ef
commit
68460612e3
1 changed files with 5 additions and 4 deletions
|
|
@ -33,9 +33,10 @@ static bool isCached = false;
|
||||||
RB_METHOD(wallpaperSet)
|
RB_METHOD(wallpaperSet)
|
||||||
{
|
{
|
||||||
RB_UNUSED_PARAM;
|
RB_UNUSED_PARAM;
|
||||||
const char *imageName;
|
const char *iname;
|
||||||
int color;
|
int color;
|
||||||
rb_get_args(argc, argv, "zi", &imageName, &color RB_ARG_END);
|
rb_get_args(argc, argv, "zi", &iname, &color RB_ARG_END);
|
||||||
|
std::string imageName = iname;
|
||||||
std::string imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".bmp";
|
std::string imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".bmp";
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Crapify the slashes
|
// Crapify the slashes
|
||||||
|
|
@ -105,8 +106,8 @@ end:
|
||||||
if (hKey)
|
if (hKey)
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
#else
|
#else
|
||||||
std::size_t found = imgname.find("w32");
|
std::size_t found = imageName.find("w32");
|
||||||
if (found != std::string::npos) imgname.replace(imgname.end()-3, imgname.end(), "unix");
|
if (found != std::string::npos) imageName.replace(imageName.end()-3, imageName.end(), "unix");
|
||||||
imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".png";
|
imgname = shState->config().gameFolder + "/Wallpaper/" + imageName + ".png";
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue