Merge pull request #314 from mkrsym1/new-fps-unlocker
Change FPS unlocker to our own
This commit is contained in:
commit
386c97c9c8
3 changed files with 10 additions and 105 deletions
|
@ -48,22 +48,10 @@ fps-unlocker = FPS Unlocker
|
||||||
enabled = Enabled
|
enabled = Enabled
|
||||||
fps-unlocker-description = Remove frames rendering limitation by modifying the game's memory. Can be detected by the anti-cheat
|
fps-unlocker-description = Remove frames rendering limitation by modifying the game's memory. Can be detected by the anti-cheat
|
||||||
|
|
||||||
power-saving = Power saving
|
unlock-interval = Overwrite interval
|
||||||
power-saving-description = Automatically set the FPS limit to 10 and low process priority upon losing focus to the game (e.g. tabbing out)
|
unlock-interval-description = Delay in milliseconds between overwriting the FPS limit value. Periodic overwrites are necessary to prevent it from resetting
|
||||||
|
|
||||||
monitor = Monitor
|
|
||||||
monitor-description = Number of monitor you want to run the game on
|
|
||||||
|
|
||||||
window-mode = Window Mode
|
window-mode = Window Mode
|
||||||
borderless = Borderless
|
borderless = Borderless
|
||||||
popup = Popup
|
popup = Popup
|
||||||
fullscreen = Fullscreen
|
fullscreen = Fullscreen
|
||||||
|
|
||||||
priority = Priority
|
|
||||||
priority-description = Game process priority
|
|
||||||
realtime = Realtime
|
|
||||||
high = High
|
|
||||||
above-normal = Above Normal
|
|
||||||
normal = Normal
|
|
||||||
below-normal = Below Normal
|
|
||||||
low = Low
|
|
||||||
|
|
|
@ -46,24 +46,12 @@ description = Описание
|
||||||
fps-unlocker = FPS Unlocker
|
fps-unlocker = FPS Unlocker
|
||||||
|
|
||||||
enabled = Включен
|
enabled = Включен
|
||||||
fps-unlocker-description = Убрать ограничение количества кадров модифицируя память игры. Может быть обнаружено античитом
|
fps-unlocker-description = Изменить ограничение частоты кадров путём модификации памяти игры. Может быть обнаружено античитом
|
||||||
|
|
||||||
power-saving = Энергосбережение
|
unlock-interval = Задержка между перезаписями
|
||||||
power-saving-description = Автоматически устанавливать предел количества кадров до 10 и снижать приоритет процесса игры когда она не находится в фокусе
|
unlock-interval-description = Задержка между перезаписями в миллисекундах. Периодическая перезапись значения ограничения необходима для предотвращения его сброса
|
||||||
|
|
||||||
monitor = Монитор
|
|
||||||
monitor-description = Номер монитора, на котором стоит запустить игру
|
|
||||||
|
|
||||||
window-mode = Режим окна
|
window-mode = Режим окна
|
||||||
borderless = Безрамочный
|
borderless = Безрамочный
|
||||||
popup = Всплывающий
|
popup = Всплывающий
|
||||||
fullscreen = Полноэкранный
|
fullscreen = Полноэкранный
|
||||||
|
|
||||||
priority = Приоритет
|
|
||||||
priority-description = Приоритет процесса игры
|
|
||||||
realtime = Реального времени
|
|
||||||
high = Высокий
|
|
||||||
above-normal = Выше среднего
|
|
||||||
normal = Средний
|
|
||||||
below-normal = Ниже среднего
|
|
||||||
low = Низкий
|
|
||||||
|
|
|
@ -603,40 +603,19 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
||||||
},
|
},
|
||||||
|
|
||||||
adw::ActionRow {
|
adw::ActionRow {
|
||||||
set_title: &tr!("power-saving"),
|
set_title: &tr!("unlock-interval"),
|
||||||
set_subtitle: &tr!("power-saving-description"),
|
set_subtitle: &tr!("unlock-interval-description"),
|
||||||
|
|
||||||
add_suffix = >k::Switch {
|
|
||||||
set_valign: gtk::Align::Center,
|
|
||||||
|
|
||||||
set_state: CONFIG.game.enhancements.fps_unlocker.config.power_saving,
|
|
||||||
|
|
||||||
connect_state_notify => |switch| {
|
|
||||||
if is_ready() {
|
|
||||||
if let Ok(mut config) = Config::get() {
|
|
||||||
config.game.enhancements.fps_unlocker.config.power_saving = switch.state();
|
|
||||||
|
|
||||||
Config::update(config);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
adw::ActionRow {
|
|
||||||
set_title: &tr!("monitor"),
|
|
||||||
set_subtitle: &tr!("monitor-description"),
|
|
||||||
|
|
||||||
add_suffix = >k::SpinButton {
|
add_suffix = >k::SpinButton {
|
||||||
set_valign: gtk::Align::Center,
|
set_valign: gtk::Align::Center,
|
||||||
set_adjustment: >k::Adjustment::new(1.0, 1.0, 10.0, 1.0, 1.0, 0.0),
|
set_adjustment: >k::Adjustment::new(1.0, 1000.0, 60000.0, 1000.0, 1.0, 0.0),
|
||||||
|
|
||||||
set_value: CONFIG.game.enhancements.fps_unlocker.config.monitor as f64,
|
set_value: CONFIG.game.enhancements.fps_unlocker.config.interval as f64,
|
||||||
|
|
||||||
connect_changed => |row| {
|
connect_changed => |row| {
|
||||||
if is_ready() {
|
if is_ready() {
|
||||||
if let Ok(mut config) = Config::get() {
|
if let Ok(mut config) = Config::get() {
|
||||||
config.game.enhancements.fps_unlocker.config.monitor = row.value() as u64;
|
config.game.enhancements.fps_unlocker.config.interval = row.value() as u64;
|
||||||
|
|
||||||
Config::update(config);
|
Config::update(config);
|
||||||
}
|
}
|
||||||
|
@ -644,56 +623,6 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
adw::ComboRow {
|
|
||||||
set_title: &tr!("window-mode"),
|
|
||||||
|
|
||||||
#[wrap(Some)]
|
|
||||||
set_model = >k::StringList::new(&[
|
|
||||||
&tr!("default"),
|
|
||||||
&tr!("popup"),
|
|
||||||
&tr!("fullscreen")
|
|
||||||
]),
|
|
||||||
|
|
||||||
set_selected: CONFIG.game.enhancements.fps_unlocker.config.window_mode.ordinal() as u32,
|
|
||||||
|
|
||||||
connect_selected_notify => |row| unsafe {
|
|
||||||
if is_ready() {
|
|
||||||
if let Ok(mut config) = Config::get() {
|
|
||||||
config.game.enhancements.fps_unlocker.config.window_mode = WindowMode::from_ordinal_unsafe(row.selected() as i8);
|
|
||||||
|
|
||||||
Config::update(config);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
adw::ComboRow {
|
|
||||||
set_title: &tr!("priority"),
|
|
||||||
set_subtitle: &tr!("priority-description"),
|
|
||||||
|
|
||||||
#[wrap(Some)]
|
|
||||||
set_model = >k::StringList::new(&[
|
|
||||||
&tr!("realtime"),
|
|
||||||
&tr!("high"),
|
|
||||||
&tr!("above-normal"),
|
|
||||||
&tr!("normal"),
|
|
||||||
&tr!("below-normal"),
|
|
||||||
&tr!("low")
|
|
||||||
]),
|
|
||||||
|
|
||||||
set_selected: CONFIG.game.enhancements.fps_unlocker.config.priority as u32,
|
|
||||||
|
|
||||||
connect_selected_notify => |row| {
|
|
||||||
if is_ready() {
|
|
||||||
if let Ok(mut config) = Config::get() {
|
|
||||||
config.game.enhancements.fps_unlocker.config.priority = row.selected() as u64;
|
|
||||||
|
|
||||||
Config::update(config);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue