mirror of
https://github.com/readmet3xt-lab/foxhound.git
synced 2026-12-06 08:58:36 +00:00
The project as of 0.2.0-pre.3, in one commit. Changes since pre.2: - Placed views: unused fields the title leaves with leftover bytes are cleared, so equal views share one host view; memory stays flat in long play (was about 3 GB more every 20 minutes and a slower frame each minute). - Controls: two keys for every pad function, mouse look and mouse buttons, read by the game from a controls file and changed at once from the launcher's or the F1 menu's "Controls". - The game's window handles F1/F2, the display mode and the mouse; the launcher reads no keys and changes no other program's window. - Static samplers made first, in one order, so the driver finds its saved pipelines again (also when DLSS loads). - Windows 10: a clear message (Shader Model 6.6 with directly indexed heaps). - A changed game executable (FPS patch) is named in the launcher's error. - Patch sites checked by BLAKE3 hash: no bytes of the title in the source. - The screen probes' ray activation runs (magenta casts, issue #2). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
2.1 KiB
PowerShell
37 lines
2.1 KiB
PowerShell
# Makes the running game's window borderless and the size of its monitor (borderless full screen). Waits up to
|
|
# 3 minutes for the window. The game itself is not touched otherwise.
|
|
# .\fullscreen.ps1
|
|
Add-Type @'
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
public static class FullWin {
|
|
[StructLayout(LayoutKind.Sequential)] public struct RECT { public int Left, Top, Right, Bottom; }
|
|
[StructLayout(LayoutKind.Sequential)] public struct MONITORINFO { public int cbSize; public RECT rcMonitor, rcWork; public uint dwFlags; }
|
|
[DllImport("user32.dll")] public static extern bool SetProcessDPIAware();
|
|
[DllImport("user32.dll")] public static extern IntPtr MonitorFromWindow(IntPtr h, uint flags);
|
|
[DllImport("user32.dll")] public static extern bool GetMonitorInfo(IntPtr m, ref MONITORINFO i);
|
|
[DllImport("user32.dll", EntryPoint = "SetWindowLongPtrW")] public static extern IntPtr SetWindowLongPtr(IntPtr h, int i, IntPtr v);
|
|
[DllImport("user32.dll")] public static extern bool SetWindowPos(IntPtr h, IntPtr after, int x, int y, int cx, int cy, uint flags);
|
|
[DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr h);
|
|
}
|
|
'@
|
|
[void][FullWin]::SetProcessDPIAware()
|
|
$p = $null
|
|
for ($i = 0; $i -lt 180 -and -not $p; $i++) {
|
|
$p = Get-Process victory -ErrorAction SilentlyContinue | Where-Object { $_.MainWindowHandle -ne 0 } | Select-Object -First 1
|
|
if (-not $p) { Start-Sleep 1 }
|
|
}
|
|
if (-not $p) { 'no game window'; return }
|
|
Start-Sleep 3
|
|
$h = $p.MainWindowHandle
|
|
$m = [FullWin]::MonitorFromWindow($h, 2)
|
|
$info = New-Object FullWin+MONITORINFO
|
|
$info.cbSize = [Runtime.InteropServices.Marshal]::SizeOf($info)
|
|
[void][FullWin]::GetMonitorInfo($m, [ref]$info)
|
|
$r = $info.rcMonitor
|
|
# WS_POPUP | WS_VISIBLE; SWP_FRAMECHANGED | SWP_SHOWWINDOW
|
|
[void][FullWin]::SetWindowLongPtr($h, -16, [IntPtr]0x90000000L)
|
|
[void][FullWin]::SetWindowPos($h, [IntPtr]::Zero, $r.Left, $r.Top, $r.Right - $r.Left, $r.Bottom - $r.Top, 0x0060)
|
|
[void][FullWin]::SetForegroundWindow($h)
|
|
"game window made borderless full screen: $($r.Right - $r.Left)x$($r.Bottom - $r.Top) at $($r.Left),$($r.Top)"
|