feat: added "force grab cursor" option to the gamescope settings

This commit is contained in:
Observer KRypt0n_ 2024-03-24 12:18:09 +02:00
parent 41e00d1c4e
commit bd439cc941
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
20 changed files with 90 additions and 11 deletions

View file

@ -11,3 +11,6 @@ nis-description = Eine Open-Source-Upscaling-Technik, die von Nvidia als herstel
other-settings = Andere Einstellungen other-settings = Andere Einstellungen
framerate-limit = Framerate-Limit framerate-limit = Framerate-Limit
unfocused-framerate-limit = Unfokussiert Framerate-Limit unfocused-framerate-limit = Unfokussiert Framerate-Limit
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = An open source upscaling technique developed by Nvidia as a cr
other-settings = Other settings other-settings = Other settings
framerate-limit = Framerate limit framerate-limit = Framerate limit
unfocused-framerate-limit = Unfocused framerate limit unfocused-framerate-limit = Unfocused framerate limit
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Una técnica de escalado de código abierto desarrollada por N
other-settings = Otras opciones other-settings = Otras opciones
framerate-limit = Límite de framerate framerate-limit = Límite de framerate
unfocused-framerate-limit = Límite de framerate en segundo plano unfocused-framerate-limit = Límite de framerate en segundo plano
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Une technologie de mise à l'échelle Open Source développée
other-settings = Autres paramètres other-settings = Autres paramètres
framerate-limit = Limitation des FPS framerate-limit = Limitation des FPS
unfocused-framerate-limit = Limitation des FPS hors focus unfocused-framerate-limit = Limitation des FPS hors focus
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Open source upscaling technika az Nvidia-tól, alternatíva a
other-settings = Egyéb beállítások other-settings = Egyéb beállítások
framerate-limit = FPS limit framerate-limit = FPS limit
unfocused-framerate-limit = Fókuszon kívüli FPS limit unfocused-framerate-limit = Fókuszon kívüli FPS limit
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Teknik peningkatan skala yang dikembangkan oleh Nvidia sebagai
other-settings = Pengaturan lainnya other-settings = Pengaturan lainnya
framerate-limit = Batas framerate framerate-limit = Batas framerate
unfocused-framerate-limit = Batas framerate saat tidak fokus unfocused-framerate-limit = Batas framerate saat tidak fokus
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Una tecnica di upscaling open-source sviluppata da Nvidia per
other-settings = Altre impostazioni other-settings = Altre impostazioni
framerate-limit = Limite del framerate framerate-limit = Limite del framerate
unfocused-framerate-limit = Limite del framerate quando fuori dal focus unfocused-framerate-limit = Limite del framerate quando fuori dal focus
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = An open source upscaling technique developed by Nvidia as a cr
other-settings = その他の設定 other-settings = その他の設定
framerate-limit = FPS制限 framerate-limit = FPS制限
unfocused-framerate-limit = 非フォーカス時の最大FPS unfocused-framerate-limit = 非フォーカス時の最大FPS
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Nvidia가 독점 DLSS 솔루션에 대한 낮은 오버헤드
other-settings = 기타 설정 other-settings = 기타 설정
framerate-limit = 프레임 속도 제한 framerate-limit = 프레임 속도 제한
unfocused-framerate-limit = 초점이 맞지 않는 프레임 속도 제한 unfocused-framerate-limit = 초점이 맞지 않는 프레임 속도 제한
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Een open source opschalingstechniek ontwikkeld door Nvidia als
other-settings = Andere instellingen other-settings = Andere instellingen
framerate-limit = Frameratelimiet framerate-limit = Frameratelimiet
unfocused-framerate-limit = Ongefocuste frameratelimiet unfocused-framerate-limit = Ongefocuste frameratelimiet
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Technika skalowania otwartego źródła opracowana przez Nvidi
other-settings = Inne ustawienia other-settings = Inne ustawienia
framerate-limit = Limit klatek na sekundę framerate-limit = Limit klatek na sekundę
unfocused-framerate-limit = Limit klatek na sekundę po utraceniu skupienia unfocused-framerate-limit = Limit klatek na sekundę po utraceniu skupienia
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Uma técnica de upscaling de código aberto desenvolvida pela
other-settings = Outras configuraões other-settings = Outras configuraões
framerate-limit = Limite de taxa de quadros framerate-limit = Limite de taxa de quadros
unfocused-framerate-limit = Limite de taxa de quadros desfocado unfocused-framerate-limit = Limite de taxa de quadros desfocado
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Открытая техника масштабирования
other-settings = Другие настройки other-settings = Другие настройки
framerate-limit = Лимит числа кадров framerate-limit = Лимит числа кадров
unfocused-framerate-limit = Лимит числа кадров вне фокуса unfocused-framerate-limit = Лимит числа кадров вне фокуса
force-grab-cursor = Принудительный захват курсора
force-grab-cursor-description = Использовать относительный режим мыши вместо переворачивания в зависимости от видимости курсора. Курсор мыши будет правильно центрирован в игре

View file

@ -11,3 +11,6 @@ nis-description = En uppskalningsteknik med öppen källkod som utvecklats av Nv
other-settings = Andra inställningar other-settings = Andra inställningar
framerate-limit = Gräns för bilduppdateringshastighet framerate-limit = Gräns för bilduppdateringshastighet
unfocused-framerate-limit = Gräns för bilduppdateringshastighet utan fokus unfocused-framerate-limit = Gräns för bilduppdateringshastighet utan fokus
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = เทคนิคการขยายขนาดโอเ
other-settings = การตั้งค่าอื่นๆ other-settings = การตั้งค่าอื่นๆ
framerate-limit = ขีดจำกัดเฟรมเรต framerate-limit = ขีดจำกัดเฟรมเรต
unfocused-framerate-limit = เฟรมเรทจำกัดขณะไม่ได้โฟกัส unfocused-framerate-limit = เฟรมเรทจำกัดขณะไม่ได้โฟกัส
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = DLSS teknolojisine düşük maliyetli bir alternatif olarak Nv
other-settings = Diğer ayarlar other-settings = Diğer ayarlar
framerate-limit = Kare hızı limiti framerate-limit = Kare hızı limiti
unfocused-framerate-limit = Odakta değilken kare hızı limiti unfocused-framerate-limit = Odakta değilken kare hızı limiti
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Відкрита техніка масштабування з
other-settings = Інші налаштування other-settings = Інші налаштування
framerate-limit = Обмеження кількості кадрів framerate-limit = Обмеження кількості кадрів
unfocused-framerate-limit = Обмеження кількості кадрів поза фокусом unfocused-framerate-limit = Обмеження кількості кадрів поза фокусом
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -11,3 +11,6 @@ nis-description = Một kỹ thuật nâng cấp mã nguồn mở do Nvidia phá
other-settings = Cài đặt khác other-settings = Cài đặt khác
framerate-limit = Giới hạn tốc độ khung hình framerate-limit = Giới hạn tốc độ khung hình
unfocused-framerate-limit = Giới hạn tốc độ khung hình khi không tập trung unfocused-framerate-limit = Giới hạn tốc độ khung hình khi không tập trung
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -1,6 +1,11 @@
game-resolution = 游戏分辨率 game-resolution = 游戏分辨率
gamescope-resolution = Gamescope 分辨率 gamescope-resolution = Gamescope 分辨率
integer-scaling = 整数倍数缩放
other-settings = 其它设置 other-settings = 其它设置
framerate-limit = 帧率限制 framerate-limit = 帧率限制
unfocused-framerate-limit = 切出游戏帧率限制 unfocused-framerate-limit = 切出游戏帧率限制
integer-scaling = 整数倍数缩放
force-grab-cursor = Force grab cursor
force-grab-cursor-description = Always use relative mouse mode instead of flipping dependent on cursor visibility. The mouse cursor will correctly be centered in the game

View file

@ -130,12 +130,12 @@ impl SimpleAsyncComponent for GamescopeApp {
add_suffix = &gtk::Switch { add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center, set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.integer_scaling, set_active: CONFIG.game.enhancements.gamescope.integer_scaling,
connect_state_notify => |switch| { connect_state_notify => |switch| {
if is_ready() { if is_ready() {
if let Ok(mut config) = Config::get() { if let Ok(mut config) = Config::get() {
config.game.enhancements.gamescope.integer_scaling = switch.state(); config.game.enhancements.gamescope.integer_scaling = switch.is_active();
Config::update(config); Config::update(config);
} }
@ -150,12 +150,12 @@ impl SimpleAsyncComponent for GamescopeApp {
add_suffix = &gtk::Switch { add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center, set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.fsr, set_active: CONFIG.game.enhancements.gamescope.fsr,
connect_state_notify => |switch| { connect_state_notify => |switch| {
if is_ready() { if is_ready() {
if let Ok(mut config) = Config::get() { if let Ok(mut config) = Config::get() {
config.game.enhancements.gamescope.fsr = switch.state(); config.game.enhancements.gamescope.fsr = switch.is_active();
Config::update(config); Config::update(config);
} }
@ -170,12 +170,12 @@ impl SimpleAsyncComponent for GamescopeApp {
add_suffix = &gtk::Switch { add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center, set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.nis, set_active: CONFIG.game.enhancements.gamescope.nis,
connect_state_notify => |switch| { connect_state_notify => |switch| {
if is_ready() { if is_ready() {
if let Ok(mut config) = Config::get() { if let Ok(mut config) = Config::get() {
config.game.enhancements.gamescope.nis = switch.state(); config.game.enhancements.gamescope.nis = switch.is_active();
Config::update(config); Config::update(config);
} }
@ -252,6 +252,26 @@ impl SimpleAsyncComponent for GamescopeApp {
} }
} }
} }
},
adw::ActionRow {
set_title: &tr!("force-grab-cursor"),
set_subtitle: &tr!("force-grab-cursor-description"),
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_active: CONFIG.game.enhancements.gamescope.force_grab_cursor,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = Config::get() {
config.game.enhancements.gamescope.force_grab_cursor = switch.is_active();
Config::update(config);
}
}
}
}
} }
} }
} }