Add wallpaper change logging

This commit is contained in:
Vinyl Darkscratch 2018-04-24 04:40:29 -07:00
parent 68460612e3
commit b5208d08b0

View file

@ -1,3 +1,5 @@
#include <iostream>
#include "etc.h" #include "etc.h"
#include "sharedstate.h" #include "sharedstate.h"
#include "binding-util.h" #include "binding-util.h"
@ -39,6 +41,7 @@ RB_METHOD(wallpaperSet)
std::string imageName = iname; 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
std::cout << "Setting wallpaper to " << imgname << std::endl;
// Crapify the slashes // Crapify the slashes
size_t index = 0; size_t index = 0;
for (;;) { for (;;) {
@ -110,6 +113,8 @@ end:
if (found != std::string::npos) imageName.replace(imageName.end()-3, imageName.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";
std::cout << "Setting wallpaper to " << imgname << std::endl;
#ifdef __APPLE__ #ifdef __APPLE__
if (!isCached) { if (!isCached) {
MacDesktop::CacheCurrentBackground(); MacDesktop::CacheCurrentBackground();