mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
mya
This commit is contained in:
parent
bb17e127f7
commit
3e892924bd
5 changed files with 29 additions and 30 deletions
|
|
@ -66,12 +66,7 @@ static VALUE profiler_set(VALUE, VALUE v) {
|
||||||
|
|
||||||
void ProfilerInit() {
|
void ProfilerInit() {
|
||||||
VALUE module = rb_define_module("Profiler");
|
VALUE module = rb_define_module("Profiler");
|
||||||
tp = rb_tracepoint_new(
|
tp = rb_tracepoint_new(Qnil, RUBY_EVENT_CALL | RUBY_EVENT_RETURN, tp_cb, nullptr);
|
||||||
Qnil,
|
|
||||||
RUBY_EVENT_CALL | RUBY_EVENT_RETURN,
|
|
||||||
tp_cb,
|
|
||||||
nullptr
|
|
||||||
);
|
|
||||||
|
|
||||||
rb_gc_register_address(&tp);
|
rb_gc_register_address(&tp);
|
||||||
rb_define_singleton_method(module, "set", RUBY_METHOD_FUNC(profiler_set), 1);
|
rb_define_singleton_method(module, "set", RUBY_METHOD_FUNC(profiler_set), 1);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
# relative to gameFolder and ignoring both RTPs and
|
# relative to gameFolder and ignoring both RTPs and
|
||||||
# encrypted archives.
|
# encrypted archives.
|
||||||
|
|
||||||
# Enable reset on F12 press and Ruby profiller
|
# Enable reset on F12 press and Ruby profiler
|
||||||
debugMode=false
|
debugMode=false
|
||||||
|
|
||||||
# Start game in fullscreen mode,
|
# Start game in fullscreen mode,
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ module Settings
|
||||||
# Debug
|
# Debug
|
||||||
:debug => false,
|
:debug => false,
|
||||||
:debug_character => false,
|
:debug_character => false,
|
||||||
:debug_text => false,
|
|
||||||
:debug_text_scene_title => true,
|
:debug_text_scene_title => true,
|
||||||
|
:debug_text => false,
|
||||||
:debug_picture_names => false,
|
:debug_picture_names => false,
|
||||||
:debug_lightmap => false,
|
:debug_lightmap => false,
|
||||||
:SDL_HINT_SHUTDOWN_DBUS_ON_QUIT => false,
|
:SDL_HINT_SHUTDOWN_DBUS_ON_QUIT => false,
|
||||||
:profiller => false,
|
:profiler => false,
|
||||||
}
|
}
|
||||||
reset_controls!
|
reset_controls!
|
||||||
end
|
end
|
||||||
|
|
@ -557,7 +557,7 @@ class Window_Settings
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Show debug text",
|
:name => "Show debug text",
|
||||||
:parameter => :debug_text,
|
:parameter => :debug_text,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
|
|
@ -579,9 +579,9 @@ class Window_Settings
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:type => :bool,
|
:type => :bool,
|
||||||
:name => "Profiller",
|
:name => "Profiler",
|
||||||
|
:parameter => :profiler,
|
||||||
:icon => [1, 0],
|
:icon => [1, 0],
|
||||||
:parameter => :profiller
|
|
||||||
},
|
},
|
||||||
{ :type => :sep },
|
{ :type => :sep },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -850,6 +850,8 @@ class Window_Settings
|
||||||
redraw
|
redraw
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------------------
|
||||||
class ActionParameter < BaseParameter
|
class ActionParameter < BaseParameter
|
||||||
TYPE = :action
|
TYPE = :action
|
||||||
|
|
||||||
|
|
@ -881,6 +883,7 @@ class Window_Settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------------------
|
||||||
class CustomParameter < BaseParameter
|
class CustomParameter < BaseParameter
|
||||||
TYPE = :custom
|
TYPE = :custom
|
||||||
def initialize(settings_content, screen_id, position, name, icon, parameter, init_value, callbacks)
|
def initialize(settings_content, screen_id, position, name, icon, parameter, init_value, callbacks)
|
||||||
|
|
|
||||||
|
|
@ -79,15 +79,15 @@ module Settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def vsync(value)
|
def vsync(value)
|
||||||
if value == 0
|
if value == 0
|
||||||
Graphics.setVsync(1)
|
Graphics.setVsync(1)
|
||||||
elsif value == 1
|
elsif value == 1
|
||||||
Graphics.setVsync(-1)
|
Graphics.setVsync(-1)
|
||||||
else
|
else
|
||||||
Graphics.setVsync(0)
|
Graphics.setVsync(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
def SDL_HINT_SHUTDOWN_DBUS_ON_QUIT(value)
|
||||||
if value
|
if value
|
||||||
|
|
@ -97,17 +97,18 @@ module Settings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def profiller(value)
|
def profiler(value)
|
||||||
Profiler.set(value)
|
Profiler.set(value)
|
||||||
end
|
end
|
||||||
|
|
||||||
def wallpaper_mode(value)
|
def wallpaper_mode(value)
|
||||||
if value == 0
|
if value == 0
|
||||||
Sunshine.wallpapermode="normal"
|
Sunshine.wallpapermode="normal"
|
||||||
elsif value == 1
|
elsif value == 1
|
||||||
Sunshine.wallpapermode="fallback"
|
Sunshine.wallpapermode="fallback"
|
||||||
else
|
else
|
||||||
Sunshine.wallpapermode="disabled"
|
Sunshine.wallpapermode="disabled"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue