This commit is contained in:
CatWindow 2026-08-16 19:13:26 +03:00
parent bb17e127f7
commit 3e892924bd
5 changed files with 29 additions and 30 deletions

View file

@ -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);

View file

@ -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,

View file

@ -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
@ -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 },
{ {

View file

@ -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)

View file

@ -97,9 +97,10 @@ 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"