mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-02-16 15:22:01 +03:00
0.7.1
- 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:
parent
027dad12eb
commit
cc5e9b3d4e
7 changed files with 35 additions and 7 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -31,7 +31,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-game-core"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"bzip2",
|
||||
"curl",
|
||||
|
@ -51,7 +51,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-game-launcher"
|
||||
version = "0.7.0"
|
||||
version = "0.7.1"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"dirs",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "anime-game-launcher"
|
||||
version = "0.7.0"
|
||||
version = "0.7.1"
|
||||
description = "Anime Game launcher"
|
||||
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8c7a8f9bcbe008f164e810aeddbe33366fa541ec
|
||||
Subproject commit 4009dc5bfe93d4b56437bda4f484affe9c5170f2
|
|
@ -84,6 +84,7 @@ Adw.PreferencesPage page {
|
|||
|
||||
Adw.ActionRow gamescope_row {
|
||||
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 {
|
||||
icon-name: "emblem-system-symbolic";
|
||||
|
|
|
@ -80,13 +80,21 @@ Adw.PreferencesWindow window {
|
|||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: "Use integer scaling";
|
||||
title: "Integer scaling";
|
||||
|
||||
Gtk.Switch integer_scaling {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: "Nvidia Image Scaling";
|
||||
|
||||
Gtk.Switch nvidia_image_scaling {
|
||||
valign: center;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: "Window type";
|
||||
|
||||
|
|
|
@ -226,8 +226,13 @@ impl Config {
|
|||
gamescope += " -n";
|
||||
}
|
||||
|
||||
// Set FSR support
|
||||
if self.game.enhancements.fsr.enabled {
|
||||
// Set NIS (Nvidia Image Scaling) support
|
||||
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";
|
||||
}
|
||||
|
||||
|
@ -418,6 +423,7 @@ pub struct Gamescope {
|
|||
pub gamescope: Size,
|
||||
pub framerate: Framerate,
|
||||
pub integer_scaling: bool,
|
||||
pub nvidia_image_scaling: bool,
|
||||
pub window_type: WindowType
|
||||
}
|
||||
|
||||
|
@ -429,6 +435,7 @@ impl Default for Gamescope {
|
|||
gamescope: Size::default(),
|
||||
framerate: Framerate::default(),
|
||||
integer_scaling: true,
|
||||
nvidia_image_scaling: false,
|
||||
window_type: WindowType::default()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ pub struct AppWidgets {
|
|||
pub framerate_limit: gtk::Entry,
|
||||
pub framerate_unfocused_limit: gtk::Entry,
|
||||
pub integer_scaling: gtk::Switch,
|
||||
pub nvidia_image_scaling: gtk::Switch,
|
||||
|
||||
pub borderless: gtk::ToggleButton,
|
||||
pub fullscreen: gtk::ToggleButton
|
||||
|
@ -45,6 +46,7 @@ impl AppWidgets {
|
|||
framerate_limit: get_object(&builder, "framerate_limit")?,
|
||||
framerate_unfocused_limit: get_object(&builder, "framerate_unfocused_limit")?,
|
||||
integer_scaling: get_object(&builder, "integer_scaling")?,
|
||||
nvidia_image_scaling: get_object(&builder, "nvidia_image_scaling")?,
|
||||
|
||||
borderless: get_object(&builder, "borderless")?,
|
||||
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
|
||||
|
||||
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);
|
||||
|
||||
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 {
|
||||
config::WindowType::Borderless => self.widgets.borderless.set_active(true),
|
||||
|
|
Loading…
Add table
Reference in a new issue