mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-02-16 09:49:46 +03:00
1.1.0
- fixed panicing when DXVK is not applied (`Config::try_get_selected_dxvk_info`) - removed 100 option from fps unlocker From previous commits: - added support for FPS unlocker - added support for system wine during initial setup - added usage of xdg-portals for folders chooser during initial setup - fixed DXVK applying using system wine
This commit is contained in:
parent
f751d4ac63
commit
aa3d7c3ffd
5 changed files with 22 additions and 11 deletions
|
@ -1,3 +1,10 @@
|
|||
# 1.1.0
|
||||
|
||||
- added support for FPS unlocker
|
||||
- added support for system wine during initial setup
|
||||
- added usage of xdg-portals for folders chooser during initial setup
|
||||
- fixed DXVK applying using system wine
|
||||
|
||||
# 1.0.4
|
||||
|
||||
- added creation of wine/dxvk folders at start if needed
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -52,7 +52,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "anime-game-launcher"
|
||||
version = "1.0.4"
|
||||
version = "1.1.0"
|
||||
dependencies = [
|
||||
"anime-game-core",
|
||||
"anyhow",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "anime-game-launcher"
|
||||
version = "1.0.4"
|
||||
version = "1.1.0"
|
||||
description = "Anime Game launcher"
|
||||
authors = ["Nikita Podvirnyy <suimin.tu.mu.ga.mi@gmail.com>"]
|
||||
license = "GPL-3.0"
|
||||
|
|
|
@ -5,9 +5,6 @@ pub enum Fps {
|
|||
/// 90
|
||||
Ninety,
|
||||
|
||||
/// 100
|
||||
Hundred,
|
||||
|
||||
/// 120
|
||||
HundredTwenty,
|
||||
|
||||
|
@ -33,7 +30,6 @@ impl Fps {
|
|||
pub fn list() -> Vec<Self> {
|
||||
vec![
|
||||
Self::Ninety,
|
||||
Self::Hundred,
|
||||
Self::HundredTwenty,
|
||||
Self::HundredFourtyFour,
|
||||
Self::HundredSixtyFive,
|
||||
|
@ -58,7 +54,6 @@ impl Fps {
|
|||
pub fn from_num(fps: u64) -> Self {
|
||||
match fps {
|
||||
90 => Self::Ninety,
|
||||
100 => Self::Hundred,
|
||||
120 => Self::HundredTwenty,
|
||||
144 => Self::HundredFourtyFour,
|
||||
165 => Self::HundredSixtyFive,
|
||||
|
@ -72,7 +67,6 @@ impl Fps {
|
|||
pub fn to_num(&self) -> u64 {
|
||||
match self {
|
||||
Self::Ninety => 90,
|
||||
Self::Hundred => 100,
|
||||
Self::HundredTwenty => 120,
|
||||
Self::HundredFourtyFour => 144,
|
||||
Self::HundredSixtyFive => 165,
|
||||
|
|
|
@ -173,9 +173,19 @@ impl Config {
|
|||
/// 2) `Ok(None)` if version wasn't found, so too old or dxvk is not applied
|
||||
/// 3) `Err(..)` if failed to get applied dxvk version, likely because wrong prefix path specified
|
||||
pub fn try_get_selected_dxvk_info(&self) -> std::io::Result<Option<DxvkVersion>> {
|
||||
let bytes = match std::fs::read(format!("{}/drive_c/windows/system32/dxgi.dll", &self.game.wine.prefix)) {
|
||||
Ok(bytes) => bytes[1600000..1700000].to_vec(),
|
||||
Err(_) => std::fs::read(format!("{}/drive_c/windows/system32/d3d11.dll", &self.game.wine.prefix))?[2400000..2500000].to_vec()
|
||||
let (bytes, from, to) = match std::fs::read(format!("{}/drive_c/windows/system32/dxgi.dll", &self.game.wine.prefix)) {
|
||||
Ok(bytes) => (bytes, 1600000, 1700000),
|
||||
Err(_) => {
|
||||
let bytes = std::fs::read(format!("{}/drive_c/windows/system32/d3d11.dll", &self.game.wine.prefix))?;
|
||||
|
||||
(bytes, 2400000, 2500000)
|
||||
}
|
||||
};
|
||||
|
||||
let bytes = if bytes.len() > to {
|
||||
bytes[from..to].to_vec()
|
||||
} else {
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
Ok({
|
||||
|
|
Loading…
Add table
Reference in a new issue