Merge fork main a803c87

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-24 18:57:47 -06:00
commit fa967c0340
22 files changed
+895 -117

No files matched your search

+2 -2
View File
@@ -1422,12 +1422,12 @@ pub(crate) fn room(memory: Option<[u64; 4]>) -> bool {
#[cfg(windows)]
pub(crate) fn let_go_idle() {
use std::sync::atomic::Ordering::Relaxed;
const IDLE_MS: u64 = 5_000;
const IDLE_FRAMES: u64 = 4;
static ON: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
if !*ON.get_or_init(|| std::env::var_os("VICTORY_TEXTURE_SWEEP").is_none_or(|v| v != "0")) {
return;
}
let idle_ms = crate::host::vram_idle_ms(crate::host::host().and_then(|h| h.video_memory()));
// For the trail (`crate::host::trail`): how many went, their bytes,
// and the first one.
let (mut went, mut bytes, mut first) = (0u64, 0u64, None);
@@ -1442,7 +1442,7 @@ pub(crate) fn let_go_idle() {
let gone = {
let mut made = r.host.made.lock().unwrap_or_else(|e| e.into_inner());
let idle = made.as_ref().is_some_and(|(host, _)| {
crate::host::long_ago(r.host.used.load(Relaxed), IDLE_MS, IDLE_FRAMES)
crate::host::long_ago(r.host.used.load(Relaxed), idle_ms, IDLE_FRAMES)
&& std::sync::Arc::strong_count(host) == 1
&& crate::host::references(&host.texture) == 1
});