- updated core library; new version caches patch fetching results
- added Nvidia Image Scaling option to gamescope

From previous commits:
- added `dxvk-async-1.10.3`
This commit is contained in:
Observer KRypt0n_ 2022-08-03 22:37:36 +02:00
parent 027dad12eb
commit cc5e9b3d4e
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
7 changed files with 35 additions and 7 deletions

4
Cargo.lock generated
View file

@ -31,7 +31,7 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-core" name = "anime-game-core"
version = "0.3.0" version = "0.3.1"
dependencies = [ dependencies = [
"bzip2", "bzip2",
"curl", "curl",
@ -51,7 +51,7 @@ dependencies = [
[[package]] [[package]]
name = "anime-game-launcher" name = "anime-game-launcher"
version = "0.7.0" version = "0.7.1"
dependencies = [ dependencies = [
"anime-game-core", "anime-game-core",
"dirs", "dirs",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "anime-game-launcher" name = "anime-game-launcher"
version = "0.7.0" version = "0.7.1"
description = "Anime Game launcher" description = "Anime Game launcher"
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"] authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
license = "GPL-3.0" license = "GPL-3.0"

@ -1 +1 @@
Subproject commit 8c7a8f9bcbe008f164e810aeddbe33366fa541ec Subproject commit 4009dc5bfe93d4b56437bda4f484affe9c5170f2

View file

@ -84,6 +84,7 @@ Adw.PreferencesPage page {
Adw.ActionRow gamescope_row { Adw.ActionRow gamescope_row {
title: "Gamescope"; title: "Gamescope";
subtitle: "Gamescope is a tool from Valve that allows for games to run in an isolated Xwayland instance and supports AMD, Intel, and Nvidia GPUs";
Gtk.Button gamescope_settings { Gtk.Button gamescope_settings {
icon-name: "emblem-system-symbolic"; icon-name: "emblem-system-symbolic";

View file

@ -80,13 +80,21 @@ Adw.PreferencesWindow window {
} }
Adw.ActionRow { Adw.ActionRow {
title: "Use integer scaling"; title: "Integer scaling";
Gtk.Switch integer_scaling { Gtk.Switch integer_scaling {
valign: center; valign: center;
} }
} }
Adw.ActionRow {
title: "Nvidia Image Scaling";
Gtk.Switch nvidia_image_scaling {
valign: center;
}
}
Adw.ActionRow { Adw.ActionRow {
title: "Window type"; title: "Window type";

View file

@ -226,8 +226,13 @@ impl Config {
gamescope += " -n"; gamescope += " -n";
} }
// Set FSR support // Set NIS (Nvidia Image Scaling) support
if self.game.enhancements.fsr.enabled { if self.game.enhancements.gamescope.nvidia_image_scaling {
gamescope += " -Y";
}
// Set FSR support (only if NIS is not enabled)
else if self.game.enhancements.fsr.enabled {
gamescope += " -U"; gamescope += " -U";
} }
@ -418,6 +423,7 @@ pub struct Gamescope {
pub gamescope: Size, pub gamescope: Size,
pub framerate: Framerate, pub framerate: Framerate,
pub integer_scaling: bool, pub integer_scaling: bool,
pub nvidia_image_scaling: bool,
pub window_type: WindowType pub window_type: WindowType
} }
@ -429,6 +435,7 @@ impl Default for Gamescope {
gamescope: Size::default(), gamescope: Size::default(),
framerate: Framerate::default(), framerate: Framerate::default(),
integer_scaling: true, integer_scaling: true,
nvidia_image_scaling: false,
window_type: WindowType::default() window_type: WindowType::default()
} }
} }

View file

@ -24,6 +24,7 @@ pub struct AppWidgets {
pub framerate_limit: gtk::Entry, pub framerate_limit: gtk::Entry,
pub framerate_unfocused_limit: gtk::Entry, pub framerate_unfocused_limit: gtk::Entry,
pub integer_scaling: gtk::Switch, pub integer_scaling: gtk::Switch,
pub nvidia_image_scaling: gtk::Switch,
pub borderless: gtk::ToggleButton, pub borderless: gtk::ToggleButton,
pub fullscreen: gtk::ToggleButton pub fullscreen: gtk::ToggleButton
@ -45,6 +46,7 @@ impl AppWidgets {
framerate_limit: get_object(&builder, "framerate_limit")?, framerate_limit: get_object(&builder, "framerate_limit")?,
framerate_unfocused_limit: get_object(&builder, "framerate_unfocused_limit")?, framerate_unfocused_limit: get_object(&builder, "framerate_unfocused_limit")?,
integer_scaling: get_object(&builder, "integer_scaling")?, integer_scaling: get_object(&builder, "integer_scaling")?,
nvidia_image_scaling: get_object(&builder, "nvidia_image_scaling")?,
borderless: get_object(&builder, "borderless")?, borderless: get_object(&builder, "borderless")?,
fullscreen: get_object(&builder, "fullscreen")? fullscreen: get_object(&builder, "fullscreen")?
@ -147,6 +149,15 @@ impl App {
} }
}); });
// Use NIS (Nvidia Image Scaling)
self.widgets.nvidia_image_scaling.connect_state_notify(move |switch| {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.nvidia_image_scaling = switch.state();
config::update(config);
}
});
// Window type // Window type
let borderless = self.widgets.borderless.clone(); let borderless = self.widgets.borderless.clone();
@ -217,6 +228,7 @@ impl App {
set_text(&self.widgets.framerate_unfocused_limit, config.game.enhancements.gamescope.framerate.unfocused); set_text(&self.widgets.framerate_unfocused_limit, config.game.enhancements.gamescope.framerate.unfocused);
self.widgets.integer_scaling.set_state(config.game.enhancements.gamescope.integer_scaling); self.widgets.integer_scaling.set_state(config.game.enhancements.gamescope.integer_scaling);
self.widgets.nvidia_image_scaling.set_state(config.game.enhancements.gamescope.nvidia_image_scaling);
match config.game.enhancements.gamescope.window_type { match config.game.enhancements.gamescope.window_type {
config::WindowType::Borderless => self.widgets.borderless.set_active(true), config::WindowType::Borderless => self.widgets.borderless.set_active(true),