mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp
synced 2026-05-29 16:45:17 -04:00
show display refresh rate in description
This commit is contained in:
@@ -377,6 +377,17 @@ struct DebugContext {
|
||||
}
|
||||
};
|
||||
|
||||
void recomp::update_rml_display_refresh_rate() {
|
||||
static uint32_t lastRate = 0;
|
||||
if (!graphics_model_handle) return;
|
||||
|
||||
uint32_t curRate = ultramodern::get_display_refresh_rate();
|
||||
if (curRate != lastRate) {
|
||||
graphics_model_handle.DirtyVariable("display_refresh_rate");
|
||||
}
|
||||
lastRate = curRate;
|
||||
}
|
||||
|
||||
DebugContext debug_context;
|
||||
|
||||
class ConfigMenu : public recomp::MenuController {
|
||||
@@ -523,6 +534,11 @@ public:
|
||||
graphics_model_handle.DirtyVariable("ds_info");
|
||||
});
|
||||
|
||||
constructor.BindFunc("display_refresh_rate",
|
||||
[](Rml::Variant& out) {
|
||||
out = ultramodern::get_display_refresh_rate();
|
||||
});
|
||||
|
||||
constructor.BindFunc("options_changed",
|
||||
[](Rml::Variant& out) {
|
||||
out = (ultramodern::get_graphics_config() != new_options);
|
||||
|
||||
Reference in New Issue
Block a user