Crash fixes: upload room reserved at the start, D3D12 folder of any version, VICTORY_HOME
- upload.rs: 32 pieces of 64 MiB at the top of [4 GiB, 2^37) are reserved first thing in main, before the process's allocations can fill that window. On players' PCs it was full by the first ray-traced frame, the first upload failed and the title threw "D3D12 XDXR Error: Failed to allocate upload buffer". Past the pool: the window as before, a failed search not repeated for a second (with PR #88's per-frame limit in memory.rs), then the heap instead of null. - main.rs: D3D12SDKVersion follows the version of D3D12\D3D12Core.dll beside the exe (a repack's 1.618 or 1.620 gave 0x887E0003 against our 614). - VICTORY_HOME: one folder for settings, saves, caches, logs and downloads (a full C: drive, issue 135). - README: both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c5f7528bbf
commit
e69e39c55b
7 files changed
+242
-62
No files matched your search
@@ -134,8 +134,19 @@ fn subdir(root: &Path, sub: &str) -> Result<PathBuf> {
|
||||
Ok(dir)
|
||||
}
|
||||
|
||||
/// `%LOCALAPPDATA%/victory/<name>` (elsewhere the XDG or home cache).
|
||||
/// The folder for everything of ours (settings, logs, caches, saves,
|
||||
/// downloads) when `VICTORY_HOME` names one: for a full C: drive, e.g.
|
||||
/// `setx VICTORY_HOME D:\victory`. Else `%LOCALAPPDATA%\victory`.
|
||||
pub fn home_override() -> Option<PathBuf> {
|
||||
std::env::var_os("VICTORY_HOME").filter(|v| !v.is_empty()).map(PathBuf::from)
|
||||
}
|
||||
|
||||
/// `%LOCALAPPDATA%/victory/<name>` (elsewhere the XDG or home cache), or
|
||||
/// `VICTORY_HOME/<name>`.
|
||||
fn default_dir(name: &str) -> Result<PathBuf> {
|
||||
if let Some(home) = home_override() {
|
||||
return Ok(home.join(name));
|
||||
}
|
||||
let base = std::env::var_os("LOCALAPPDATA")
|
||||
.or_else(|| std::env::var_os("XDG_CACHE_HOME"))
|
||||
.map(PathBuf::from)
|
||||
|
||||
Reference in new issue
Block a user