aboutsummaryrefslogtreecommitdiff
path: root/libs/nak/src/dxvk.rs
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-08 03:30:04 -0500
committerSulfurNitride <SulfurNitride@users.noreply.github.com>2026-04-08 03:30:04 -0500
commit3de4056df4ea5d0afbcea388ad8d681daea1aac3 (patch)
treefc5978451f9f51b84268f45bd2fa6f5d4a17baaf /libs/nak/src/dxvk.rs
parent5ba23a6d7a40052d9e1d4bd0cf018cfe7814d03a (diff)
Remove NaK/Rust dependency, port remaining functionality to native C++
Replace NaK Rust crate and nak_ffi with native C++ implementations: - Game detection (Steam, Heroic, Bottles), VDF parser, icon extraction - Prefix symlinks, SLR manager, Steam path detection - Known games database Add FUSE VFS optimizations: zero-copy reads via fuse_reply_data, default_permissions mount option, FUSE_CAP_ASYNC_DIO, FUSE_CAP_EXPIRE_ONLY, lookup cache parent index, cached mode bits, increased I/O buffer sizes. Update build system, prefix setup, and various fixes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/nak/src/dxvk.rs')
-rw-r--r--libs/nak/src/dxvk.rs69
1 files changed, 0 insertions, 69 deletions
diff --git a/libs/nak/src/dxvk.rs b/libs/nak/src/dxvk.rs
deleted file mode 100644
index b335773..0000000
--- a/libs/nak/src/dxvk.rs
+++ /dev/null
@@ -1,69 +0,0 @@
-//! DXVK configuration management for Fluorine Manager.
-//!
-//! Downloads dxvk.conf from upstream, appends Fluorine-specific settings,
-//! and stores at `~/.local/share/fluorine/config/dxvk.conf`.
-
-use std::error::Error;
-use std::fs;
-use std::path::{Path, PathBuf};
-
-use crate::logging::{log_info, log_warning};
-
-const DXVK_CONF_URL: &str =
- "https://raw.githubusercontent.com/doitsujin/dxvk/master/dxvk.conf";
-
-const DXVK_CUSTOM_SETTINGS: &str = r#"
-# Fluorine Custom Settings
-# Disable Graphics Pipeline Library (can cause issues with modded games)
-dxvk.enableGraphicsPipelineLibrary = False
-"#;
-
-/// Get the path where the DXVK config will be stored.
-pub fn get_dxvk_conf_path() -> PathBuf {
- crate::paths::data_dir().join("config/dxvk.conf")
-}
-
-/// Ensure the dxvk.conf file exists, downloading if necessary.
-///
-/// Returns the path to the config file.
-pub fn ensure_dxvk_conf() -> Result<PathBuf, Box<dyn Error>> {
- let conf_path = get_dxvk_conf_path();
-
- // If it already exists, return it
- if conf_path.exists() {
- return Ok(conf_path);
- }
-
- download_and_create_dxvk_conf(&conf_path)
-}
-
-/// Download the upstream dxvk.conf, append custom settings, and write to `dest`.
-pub fn download_and_create_dxvk_conf(dest: &Path) -> Result<PathBuf, Box<dyn Error>> {
- // Ensure parent directory exists
- if let Some(parent) = dest.parent() {
- fs::create_dir_all(parent)?;
- }
-
- log_info("Downloading dxvk.conf from upstream...");
-
- let upstream_content = match ureq::get(DXVK_CONF_URL).call() {
- Ok(response) => {
- let mut body = String::new();
- response.into_reader().read_to_string(&mut body)?;
- body
- }
- Err(e) => {
- log_warning(&format!("Failed to download dxvk.conf: {}", e));
- // Create with just custom settings if download fails
- String::new()
- }
- };
-
- let full_content = format!("{}\n{}", upstream_content, DXVK_CUSTOM_SETTINGS);
- fs::write(dest, &full_content)?;
-
- log_info(&format!("Created dxvk.conf at {:?}", dest));
- Ok(dest.to_path_buf())
-}
-
-use std::io::Read as _;