Feature Request: Black Bar UltraWide Support #174

Open
opened 2026-11-30 20:04:22 +00:00 by github-bot · 4 comments
Owner

@⁠Iupin on GitHub · 2026-11-30 20:03 UTC · original

Can we add black bars for those with Ultra Wides so we can full screen without a stretched image?

**@⁠Iupin** on GitHub · 2026-11-30 20:03 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/174) Can we add black bars for those with Ultra Wides so we can full screen without a stretched image?
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 20:04:22 +00:00
Author
Owner

@⁠FoxNineOne on GitHub · 2026-11-30 23:59 UTC · original · edited 2026-12-01 00:04 UTC

This is an amended fullscreen.ps1
Run the game in windowed mode, then when it loads up, run this.
Working for me (only tested for 5 minutes though)

(I haven't commented on Github before, it seems the markdown is messing up formatting of the code.. so I've attached it too!)
fullscreen.ps1.txt

`# 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 = "SetWindowLongPt

rW")] 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)"

#>
Add-Type -AssemblyName System.Windows.Forms
$r = $info.rcMonitor
$mw = $r.Right - $r.Left
$mh = $r.Bottom - $r.Top

Largest 16:9 area that fits, centred

$ww = [int]($mh * 16 / 9)
$wh = $mh
if ($ww -gt $mw) { $ww = $mw; $wh = [int]($mw * 9 / 16) }
$x = $r.Left + [int](($mw - $ww) / 2)
$y = $r.Top + [int](($mh - $wh) / 2)

Black backdrop covering the whole monitor (hides desktop and taskbar)

$bg = New-Object System.Windows.Forms.Form
$bg.FormBorderStyle = 'None'
$bg.BackColor = [System.Drawing.Color]::Black
$bg.StartPosition = 'Manual'
$bg.Location = New-Object System.Drawing.Point($r.Left, $r.Top)
$bg.Size = New-Object System.Drawing.Size($mw, $mh)
$bg.ShowInTaskbar = $false
$bg.TopMost = $true
$bg.Show()

Backdrop never takes focus: WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE

[void][FullWin]::SetWindowLongPtr($bg.Handle, -20, [IntPtr]0x08000088L)
[void][FullWin]::SetWindowPos($bg.Handle, IntPtr, $r.Left, $r.Top, $mw, $mh, 0x0050)

Game: borderless, 16:9, topmost (-1) so it sits above the backdrop

WS_POPUP | WS_VISIBLE; SWP_FRAMECHANGED | SWP_SHOWWINDOW

[void][FullWin]::SetWindowLongPtr($h, -16, [IntPtr]0x90000000L)
[void][FullWin]::SetWindowPos($h, IntPtr, $x, $y, $ww, $wh, 0x0060)
[void][FullWin]::SetForegroundWindow($h)
"game borderless 16:9: ${ww}x${wh} at $x,$y with black backdrop (close the game to exit)"

Keep the backdrop alive until the game exits

while (-not $p.HasExited) {
[System.Windows.Forms.Application]::DoEvents()
Start-Sleep -Milliseconds 100
}
$bg.Close()`

**@⁠FoxNineOne** on GitHub · 2026-11-30 23:59 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/174#issuecomment-7295792051) · edited 2026-12-01 00:04 UTC This is an amended fullscreen.ps1 Run the game in windowed mode, then when it loads up, run this. Working for me (only tested for 5 minutes though) (I haven't commented on Github before, it seems the markdown is messing up formatting of the code.. so I've attached it too!) [fullscreen.ps1.txt](https://github.com/user-attachments/files/35648457/fullscreen.ps1.txt) `# 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 = "SetWindowLongPt rW")] 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)" #> Add-Type -AssemblyName System.Windows.Forms $r = $info.rcMonitor $mw = $r.Right - $r.Left $mh = $r.Bottom - $r.Top # Largest 16:9 area that fits, centred $ww = [int]($mh * 16 / 9) $wh = $mh if ($ww -gt $mw) { $ww = $mw; $wh = [int]($mw * 9 / 16) } $x = $r.Left + [int](($mw - $ww) / 2) $y = $r.Top + [int](($mh - $wh) / 2) # Black backdrop covering the whole monitor (hides desktop and taskbar) $bg = New-Object System.Windows.Forms.Form $bg.FormBorderStyle = 'None' $bg.BackColor = [System.Drawing.Color]::Black $bg.StartPosition = 'Manual' $bg.Location = New-Object System.Drawing.Point($r.Left, $r.Top) $bg.Size = New-Object System.Drawing.Size($mw, $mh) $bg.ShowInTaskbar = $false $bg.TopMost = $true $bg.Show() # Backdrop never takes focus: WS_EX_TOPMOST | WS_EX_TOOLWINDOW | WS_EX_NOACTIVATE [void][FullWin]::SetWindowLongPtr($bg.Handle, -20, [IntPtr]0x08000088L) [void][FullWin]::SetWindowPos($bg.Handle, [IntPtr](-1), $r.Left, $r.Top, $mw, $mh, 0x0050) # Game: borderless, 16:9, topmost (-1) so it sits above the backdrop # WS_POPUP | WS_VISIBLE; SWP_FRAMECHANGED | SWP_SHOWWINDOW [void][FullWin]::SetWindowLongPtr($h, -16, [IntPtr]0x90000000L) [void][FullWin]::SetWindowPos($h, [IntPtr](-1), $x, $y, $ww, $wh, 0x0060) [void][FullWin]::SetForegroundWindow($h) "game borderless 16:9: ${ww}x${wh} at $x,$y with black backdrop (close the game to exit)" # Keep the backdrop alive until the game exits while (-not $p.HasExited) { [System.Windows.Forms.Application]::DoEvents() Start-Sleep -Milliseconds 100 } $bg.Close()`
Author
Owner

@⁠Pandahodka on GitHub · 2026-12-01 23:50 UTC · original

Hello, How (or where) are we suppose to run your code ? Sorry I'm a noob

**@⁠Pandahodka** on GitHub · 2026-12-01 23:50 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/174#issuecomment-7329836286) Hello, How (or where) are we suppose to run your code ? Sorry I'm a noob
Author
Owner

@⁠FoxNineOne on GitHub · 2026-12-01 23:59 UTC · original

Hello, How (or where) are we suppose to run your code ? Sorry I'm a noob

Easiest way is to download the attachment, rename so it is a .ps1 file. (I had to add ".txt" on the end to allow it to upload on this conversation.)

Run the game in windowed mode, not full screen. Once the game window loads up, right click on the ps1 file, click "open with" and select "PowerShell". The game should then go full screen with black bars.

**@⁠FoxNineOne** on GitHub · 2026-12-01 23:59 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/174#issuecomment-7330003122) > Hello, How (or where) are we suppose to run your code ? Sorry I'm a noob Easiest way is to download the attachment, rename so it is a .ps1 file. (I had to add ".txt" on the end to allow it to upload on this conversation.) Run the game in windowed mode, not full screen. Once the game window loads up, right click on the ps1 file, click "open with" and select "PowerShell". The game should then go full screen with black bars.
Author
Owner

@⁠Pandahodka on GitHub · 2026-12-02 00:12 UTC · original

Thank you !

**@⁠Pandahodka** on GitHub · 2026-12-02 00:12 UTC · [original](https://github.com/readmet3xt-lab/foxhound/issues/174#issuecomment-7330268505) Thank you !
This discussion has been locked. Commenting is limited to contributors.
No description provided.