Fixed SunshineBinding amammama

This commit is contained in:
DepressedTWM 2026-05-01 07:04:51 -04:00
parent c90326ffbd
commit 65b26c85e3
2 changed files with 11 additions and 10 deletions

View File

@ -4,9 +4,10 @@
void SunshineBindingInit(){ void SunshineBindingInit(){
printf("[SunshineBindingInit] Initializing Sunshine binding\n"); printf("[SunshineBindingInit] Initializing Sunshine binding\n");
VALUE module = rb_define_module("Sunshine"); VALUE module = rb_define_module("Sunshine");
rb_define_const(module, "SDLVersion_major", INT2NUM(SDL_MAJOR_VERSION));
rb_define_const(module, "SDLVersion", INT2NUM(SDL_VERSION)); rb_define_const(module, "SDLVersion_minor", INT2NUM(SDL_MINOR_VERSION));
rb_define_const(module, "SDLVersion_micro", INT2NUM(SDL_MICRO_VERSION));
printf("[SunshineBindingInit] SDL version: %u\n", SDL_VERSION); //SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION
printf("[SunshineBindingInit] SDL version: %i.%i.%i\n", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION);
printf("[SunshineBindingInit] Done\n"); printf("[SunshineBindingInit] Done\n");
} }

View File

@ -158,7 +158,7 @@
} }
configFile.close(); configFile.close();
} else { } else {
Debug() << "[desktopEnvironmentInit]FATAL: Cannot find desktop configuration!"; Debug() << "[desktopEnvironmentInit] FATAL: Cannot find desktop configuration!";
desktop = "kde_error"; desktop = "kde_error";
} }
} else { } else {
@ -250,7 +250,7 @@ end:
} }
path = "/Wallpaper/" + nameFix + ".png"; path = "/Wallpaper/" + nameFix + ".png";
Debug() << "[wallpaperSet]Setting wallpaper to " << path; Debug() << "[wallpaperSet] Setting wallpaper to " << path;
#ifdef __APPLE__ #ifdef __APPLE__
if (!isCached) { if (!isCached) {
@ -348,7 +348,7 @@ end:
"'"; "'";
Debug() << "[wallpaperSet] Wallpaper command:" << command.str(); Debug() << "[wallpaperSet] Wallpaper command:" << command.str();
int result = system(command.str().c_str()); int result = system(command.str().c_str());
Debug() << "[wallpaperSet ]Result:" << result; Debug() << "[wallpaperSet ] Result:" << result;
} else { } else {
std::ifstream srcHint(gameDirStr + path); std::ifstream srcHint(gameDirStr + path);
std::ofstream dstHint(fallbackPath); std::ofstream dstHint(fallbackPath);
@ -470,12 +470,12 @@ RB_METHOD(wallpaperReset){
"}" << "}" <<
"}" << "}" <<
"'"; "'";
Debug() << "[wallpaperReset]Reset wallpaper command:" << command.str(); Debug() << "[wallpaperReset] Reset wallpaper command:" << command.str();
int result = system(command.str().c_str()); int result = system(command.str().c_str());
Debug() << "[wallpaperReset]Reset result:" << result; Debug() << "[wallpaperReset] Reset result:" << result;
} else { } else {
if (remove(fallbackPath.c_str()) != 0) { if (remove(fallbackPath.c_str()) != 0) {
Debug() << "[wallpaperReset]Failed to delete:" << fallbackPath; Debug() << "[wallpaperReset] Failed to delete:" << fallbackPath;
} }
} }
#endif #endif