mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-02 22:10:50 +03:00
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
|
||||
fps-unlocker-description = Remove frames rendering limitation by modifying the game's memory. Can be detected by the anti-cheat
|
||||
|
||||
power-saving = Power saving
|
||||
power-saving-description = Automatically set the FPS limit to 10 and low process priority upon losing focus to the game (e.g. tabbing out)
|
||||
|
||||
monitor = Monitor
|
||||
monitor-description = Number of monitor you want to run the game on
|
||||
unlock-interval = Overwrite interval
|
||||
unlock-interval-description = Delay in milliseconds between overwriting the FPS limit value. Periodic overwrites are necessary to prevent it from resetting
|
||||
|
||||
window-mode = Window Mode
|
||||
borderless = Borderless
|
||||
popup = Popup
|
||||
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
|
||||
|
||||
enabled = Включен
|
||||
fps-unlocker-description = Убрать ограничение количества кадров модифицируя память игры. Может быть обнаружено античитом
|
||||
fps-unlocker-description = Изменить ограничение частоты кадров путём модификации памяти игры. Может быть обнаружено античитом
|
||||
|
||||
power-saving = Энергосбережение
|
||||
power-saving-description = Автоматически устанавливать предел количества кадров до 10 и снижать приоритет процесса игры когда она не находится в фокусе
|
||||
|
||||
monitor = Монитор
|
||||
monitor-description = Номер монитора, на котором стоит запустить игру
|
||||
unlock-interval = Задержка между перезаписями
|
||||
unlock-interval-description = Задержка между перезаписями в миллисекундах. Периодическая перезапись значения ограничения необходима для предотвращения его сброса
|
||||
|
||||
window-mode = Режим окна
|
||||
borderless = Безрамочный
|
||||
popup = Всплывающий
|
||||
fullscreen = Полноэкранный
|
||||
|
||||
priority = Приоритет
|
||||
priority-description = Приоритет процесса игры
|
||||
realtime = Реального времени
|
||||
high = Высокий
|
||||
above-normal = Выше среднего
|
||||
normal = Средний
|
||||
below-normal = Ниже среднего
|
||||
low = Низкий
|
||||
|
|
|
@ -603,40 +603,19 @@ impl SimpleAsyncComponent for EnhancementsApp {
|
|||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: &tr!("power-saving"),
|
||||
set_subtitle: &tr!("power-saving-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"),
|
||||
set_title: &tr!("unlock-interval"),
|
||||
set_subtitle: &tr!("unlock-interval-description"),
|
||||
|
||||
add_suffix = >k::SpinButton {
|
||||
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| {
|
||||
if is_ready() {
|
||||
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);
|
||||
}
|
||||
|
@ -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…
Add table
Reference in a new issue