mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
ga
This commit is contained in:
parent
bf160b79e7
commit
d1124b7b35
5 changed files with 27 additions and 7 deletions
|
|
@ -12,16 +12,19 @@
|
||||||
#include "eventthread.h"
|
#include "eventthread.h"
|
||||||
#include "sunshine.h"
|
#include "sunshine.h"
|
||||||
#include "meow.h"
|
#include "meow.h"
|
||||||
|
#include "sharedstate.h"
|
||||||
static VALUE sunshine_get_crash_privacy(VALUE self) {
|
|
||||||
return is_privacy_crashdump_enabled ? Qtrue : Qfalse;
|
|
||||||
}
|
|
||||||
|
|
||||||
static VALUE sunshine_set_crash_privacy(VALUE, VALUE v) {
|
static VALUE sunshine_set_crash_privacy(VALUE, VALUE v) {
|
||||||
is_privacy_crashdump_enabled = RTEST(v);
|
is_privacy_crashdump_enabled = RTEST(v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static VALUE sunshine_set_wallpaper_mode(VALUE, VALUE v) {
|
||||||
|
std::string s(StringValueCStr(v));
|
||||||
|
shState->config().wallpaperMode = s;
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
static VALUE sunshine_set_hint(VALUE, VALUE h, VALUE v) {
|
static VALUE sunshine_set_hint(VALUE, VALUE h, VALUE v) {
|
||||||
return SDL_SetHint(StringValueCStr(h), StringValueCStr(v));
|
return SDL_SetHint(StringValueCStr(h), StringValueCStr(v));
|
||||||
}
|
}
|
||||||
|
|
@ -65,8 +68,8 @@ void SunshineBindingInit(){
|
||||||
#else
|
#else
|
||||||
rb_const_set(module, rb_intern("DEVBUILD"), Qfalse);
|
rb_const_set(module, rb_intern("DEVBUILD"), Qfalse);
|
||||||
#endif
|
#endif
|
||||||
rb_define_singleton_method(module, "crashprivacy", RUBY_METHOD_FUNC(sunshine_get_crash_privacy), 0);
|
|
||||||
rb_define_singleton_method(module, "crashprivacy=", RUBY_METHOD_FUNC(sunshine_set_crash_privacy), 1);
|
rb_define_singleton_method(module, "crashprivacy=", RUBY_METHOD_FUNC(sunshine_set_crash_privacy), 1);
|
||||||
|
rb_define_singleton_method(module, "wallpapermode=", RUBY_METHOD_FUNC(sunshine_set_wallpaper_mode), 1);
|
||||||
rb_define_singleton_method(module, "setSDLHint", RUBY_METHOD_FUNC(sunshine_set_hint), 2);
|
rb_define_singleton_method(module, "setSDLHint", RUBY_METHOD_FUNC(sunshine_set_hint), 2);
|
||||||
//если методы доступны то просто не перезаписываем их
|
//если методы доступны то просто не перезаписываем их
|
||||||
if (!rb_respond_to(rb_cObject, rb_intern("class"))) {
|
if (!rb_respond_to(rb_cObject, rb_intern("class"))) {
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,8 @@ pancakes=false
|
||||||
# recommended use when you play with mods.
|
# recommended use when you play with mods.
|
||||||
SecurityEngine=true
|
SecurityEngine=true
|
||||||
|
|
||||||
# Controls the change of wallpaper on Linux and *NIX
|
# Controls the change of wallpaper
|
||||||
|
# The set value through the in-game settings takes precedence over these.
|
||||||
# Available modes:
|
# Available modes:
|
||||||
# normal - normal wallpaper changing
|
# normal - normal wallpaper changing
|
||||||
# fallback - Uses fallback mode, a hint using a file in the user folder.
|
# fallback - Uses fallback mode, a hint using a file in the user folder.
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ module Settings
|
||||||
:oneshot_mode => false,
|
:oneshot_mode => false,
|
||||||
:twm_shader_footprint => true,
|
:twm_shader_footprint => true,
|
||||||
:disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already => false,
|
:disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already => false,
|
||||||
|
:wallpaper_mode => 0,
|
||||||
|
|
||||||
# Advanced
|
# Advanced
|
||||||
:crashlog_privacy => false,
|
:crashlog_privacy => false,
|
||||||
|
|
@ -309,6 +310,12 @@ class Window_Settings
|
||||||
:name => "Disable System API Dependent Puzzles(For wayland users)",
|
:name => "Disable System API Dependent Puzzles(For wayland users)",
|
||||||
:parameter => :disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already
|
:parameter => :disable_pizzles_for_fuckin_gayland_users_gayland_devs_fix_your_bullshit_already
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
:type => :enum,
|
||||||
|
:name => "Wallpaper mode",
|
||||||
|
:parameter => :wallpaper_mode,
|
||||||
|
:values => ["Normal", "Fallback", "Disabled"]
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"Controls" => [
|
"Controls" => [
|
||||||
{ :type => :sep, :name => "Gamepad" },
|
{ :type => :sep, :name => "Gamepad" },
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,15 @@ module Settings
|
||||||
def profiller(value)
|
def profiller(value)
|
||||||
Profiler.set(value)
|
Profiler.set(value)
|
||||||
end
|
end
|
||||||
|
def wallpaper_mode(value)
|
||||||
|
if value == 0
|
||||||
|
Sunshine.wallpapermode="normal"
|
||||||
|
elsif value == 1
|
||||||
|
Sunshine.wallpapermode="fallback"
|
||||||
|
else
|
||||||
|
Sunshine.wallpapermode="disabled"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ int main(int argc, char *argv[]){
|
||||||
freopen("CONOUT$", "w", stderr);
|
freopen("CONOUT$", "w", stderr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!conf.gameFolder.empty()){
|
if (!conf.gameFolder.empty()){
|
||||||
if (chdir(conf.gameFolder.c_str()) != 0){
|
if (chdir(conf.gameFolder.c_str()) != 0){
|
||||||
WarnMsg("Unable to switch into gameFolder %s", conf.gameFolder.c_str());
|
WarnMsg("Unable to switch into gameFolder %s", conf.gameFolder.c_str());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue