Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes are documented here. Versions follow the Playnite extension

## [Unreleased]

## [0.7.1] - 2026-09-13

### Fixed

- The Desktop-to-Fullscreen bootstrap cover now uses the monitor's physical display bounds when Windows DPI virtualization reports scaled WinForms coordinates, preventing a smaller black rectangle from appearing in the top-left corner before the boot video on high-DPI and virtual displays.

### Changed

- Runtime updated to 1.0.8.

## [0.7.0] - 2026-09-11

### Added
Expand Down
4 changes: 2 additions & 2 deletions PlayniteBoot/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
[assembly: AssemblyCopyright("Copyright © VirtualGIT20 2026")]
[assembly: ComVisible(false)]
[assembly: Guid("29f3bcc1-12ed-423e-8c61-d0eb0218eec3")]
[assembly: AssemblyVersion("0.7.0.0")]
[assembly: AssemblyFileVersion("0.7.0.0")]
[assembly: AssemblyVersion("0.7.1.0")]
[assembly: AssemblyFileVersion("0.7.1.0")]
158 changes: 145 additions & 13 deletions PlayniteBoot/RuntimeTemplate/SwitchBootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,104 @@ function Get-PropertyValue {
return $property.Value
}

function Initialize-BootstrapNativeMethods {
if ('PlayniteBootSwitchBootstrap.Native' -as [type]) {
return
}

Add-Type -TypeDefinition @'
using System;
using System.Runtime.InteropServices;

namespace PlayniteBootSwitchBootstrap
{
public static class Native
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DEVMODE
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
public ushort dmSpecVersion;
public ushort dmDriverVersion;
public ushort dmSize;
public ushort dmDriverExtra;
public uint dmFields;
public int dmPositionX;
public int dmPositionY;
public uint dmDisplayOrientation;
public uint dmDisplayFixedOutput;
public short dmColor;
public short dmDuplex;
public short dmYResolution;
public short dmTTOption;
public short dmCollate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmFormName;
public ushort dmLogPixels;
public uint dmBitsPerPel;
public uint dmPelsWidth;
public uint dmPelsHeight;
public uint dmDisplayFlags;
public uint dmDisplayFrequency;
public uint dmICMMethod;
public uint dmICMIntent;
public uint dmMediaType;
public uint dmDitherType;
public uint dmReserved1;
public uint dmReserved2;
public uint dmPanningWidth;
public uint dmPanningHeight;
}

[DllImport("user32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool EnumDisplaySettingsEx(
string lpszDeviceName,
int iModeNum,
ref DEVMODE lpDevMode,
uint dwFlags);

[DllImport("user32.dll")]
public static extern IntPtr SetThreadDpiAwarenessContext(IntPtr dpiContext);
}
}
'@
}

function Get-PhysicalDisplayBounds {
param(
[Parameter(Mandatory = $true)]$Screen
)

try {
Initialize-BootstrapNativeMethods

$mode = New-Object PlayniteBootSwitchBootstrap.Native+DEVMODE
$mode.dmSize = [uint16][Runtime.InteropServices.Marshal]::SizeOf([type][PlayniteBootSwitchBootstrap.Native+DEVMODE])

$enumCurrentSettings = -1
$ok = [PlayniteBootSwitchBootstrap.Native]::EnumDisplaySettingsEx(
[string]$Screen.DeviceName,
$enumCurrentSettings,
[ref]$mode,
0)

if (-not $ok -or $mode.dmPelsWidth -eq 0 -or $mode.dmPelsHeight -eq 0) {
return $null
}

return New-Object System.Drawing.Rectangle(
[int]$mode.dmPositionX,
[int]$mode.dmPositionY,
[int]$mode.dmPelsWidth,
[int]$mode.dmPelsHeight)
}
catch {
return $null
}
}

function Select-BootstrapScreen {
param(
[Parameter(Mandatory = $true)]$Config,
Expand Down Expand Up @@ -134,19 +232,53 @@ try {
}

$bounds = $selectedScreen.Bounds
$form = New-Object System.Windows.Forms.Form
$form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::None
$form.StartPosition = [System.Windows.Forms.FormStartPosition]::Manual
$form.Bounds = $bounds
$form.BackColor = [System.Drawing.Color]::Black
$form.TopMost = $true
$form.ShowInTaskbar = $false
$form.ControlBox = $false

$form.Show()
$form.BringToFront()
$form.Refresh()
[System.Windows.Forms.Application]::DoEvents()
$physicalBounds = Get-PhysicalDisplayBounds -Screen $selectedScreen
$previousDpiContext = [IntPtr]::Zero
$usePhysicalBounds = $false

if ($null -ne $physicalBounds) {
try {
Initialize-BootstrapNativeMethods
$dpiAwarenessContextPerMonitorAwareV2 = [IntPtr](-4)
$previousDpiContext = [PlayniteBootSwitchBootstrap.Native]::SetThreadDpiAwarenessContext(
$dpiAwarenessContextPerMonitorAwareV2)
$usePhysicalBounds = ($previousDpiContext -ne [IntPtr]::Zero)
}
catch {
$previousDpiContext = [IntPtr]::Zero
$usePhysicalBounds = $false
}
}

try {
if ($usePhysicalBounds) {
$bounds = $physicalBounds
}

$form = New-Object System.Windows.Forms.Form
$form.AutoScaleMode = [System.Windows.Forms.AutoScaleMode]::None
$form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::None
$form.StartPosition = [System.Windows.Forms.FormStartPosition]::Manual
$form.Bounds = $bounds
$form.BackColor = [System.Drawing.Color]::Black
$form.TopMost = $true
$form.ShowInTaskbar = $false
$form.ControlBox = $false

$form.Show()
$form.BringToFront()
$form.Refresh()
[System.Windows.Forms.Application]::DoEvents()
}
finally {
if ($usePhysicalBounds -and $previousDpiContext -ne [IntPtr]::Zero) {
try {
[void][PlayniteBootSwitchBootstrap.Native]::SetThreadDpiAwarenessContext($previousDpiContext)
}
catch {
}
}
}

$readyEvent = [System.Threading.EventWaitHandle]::OpenExisting($SwitchReadyEventName)
[void]$readyEvent.Set()
Expand Down
2 changes: 1 addition & 1 deletion PlayniteBoot/RuntimeTemplate/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.7
1.0.8
2 changes: 1 addition & 1 deletion PlayniteBoot/extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Id: PlayniteBoot_71b5c099-3c25-4fe7-b26f-1262c7f0e138
Name: Playnite Boot Screen
Author: VirtualGIT20
Version: 0.7.0
Version: 0.7.1
Module: PlayniteBoot.dll
Type: GenericPlugin
Icon: icon.png
Expand Down
21 changes: 9 additions & 12 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Playnite Boot Screen 0.7.0

This feature release extends Playnite Boot Screen to Playnite's native Desktop-to-Fullscreen transition and hardens runtime updates.
# Playnite Boot Screen 0.7.1

This maintenance hotfix corrects the Desktop-to-Fullscreen bootstrap cover on high-DPI and virtual displays.
Highlights:
- the configured boot video can cover Playnite's built-in Desktop-to-Fullscreen switch;
- the new switch integration is enabled by default and can be disabled from the extension settings;
- a lightweight on-demand black bootstrap cover bridges the Desktop closing phase to the existing WPF boot overlay, with no resident helper process;
- Playnite still owns and performs its native Desktop-to-Fullscreen transition; if the cover cannot be armed, the integration fails open and Playnite continues normally;
- the existing monitor selection, video playback, readiness detection, fade, cancellation, and foreground handling are reused for the switch path;
- managed runtime files are synchronized by content on Playnite startup, so an outdated or modified managed file is repaired even if the runtime version marker was not changed;
- runtime updated to 1.0.7.

Existing shortcuts, custom media, settings, and Sunshine/Apollo streaming configuration remain compatible.
- the temporary black handoff cover now resolves the selected monitor's physical position and resolution instead of treating DPI-virtualized WinForms bounds as physical pixels;
- the bootstrap cover is created under a temporary per-monitor DPI context, which is restored before the existing WPF boot overlay continues;
- this prevents the cover from appearing as a smaller black rectangle in the top-left corner before the video on high-scaling displays, including 4K virtual displays;
- the normal WPF overlay, video playback, Standalone flow, Sunshine/Apollo streaming flow, monitor selection, foreground handling, and log rotation are unchanged;
- no additional per-switch logging is introduced by this hotfix;
- runtime updated to 1.0.8.
Existing shortcuts, custom media, settings, and streaming configuration remain compatible.
7 changes: 7 additions & 0 deletions distribution/installer.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
AddonId: PlayniteBoot_71b5c099-3c25-4fe7-b26f-1262c7f0e138
Packages:
- Version: 0.7.1
RequiredApiVersion: 6.16.0
ReleaseDate: 2026-09-13
PackageUrl: https://github.com/VirtualGIT20/Playnite-Boot-Screen/releases/download/v0.7.1/Playnite-Boot-Screen-v0.7.1.pext
Changelog:
- Fix the Desktop-to-Fullscreen handoff cover sizing on high-DPI and virtual displays.
- Resolve physical monitor bounds for the temporary bootstrap cover while leaving the normal WPF boot overlay unchanged.
- Version: 0.7.0
RequiredApiVersion: 6.16.0
ReleaseDate: 2026-09-11
Expand Down
15 changes: 8 additions & 7 deletions docs/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Release checklist — 0.7.0
# Release checklist — 0.7.1

## Code and behavior

Expand Down Expand Up @@ -26,19 +26,20 @@
- [ ] Desktop and Start shortcuts can be created, renamed, and removed.
- [ ] Invalid or modified shortcut state cannot escape the Desktop or Start menu directories.
- [ ] Runtime log rotates to `PlayniteBoot.log.1` after 2 MiB.
- [ ] With `VERSION.txt` unchanged at `1.0.7`, modifying a managed installed runtime file is repaired automatically on the next Playnite start.
- [ ] With `VERSION.txt` unchanged at `1.0.8`, modifying a managed installed runtime file is repaired automatically on the next Playnite start.

## Display matrix

- [ ] Single 1080p display at 100% scaling.
- [ ] Single 4K display at 150% or 200% scaling.
- [ ] 4K display or VDD at 250% scaling: the bootstrap cover fills the physical display before the video.
- [ ] The same 4K display or VDD at 100% scaling: the bootstrap cover remains full-screen.
- [ ] Mixed 1080p/4K displays with different scaling values.
- [ ] Secondary display with negative desktop coordinates.
- [ ] Sunshine/Apollo virtual display at 4K60.

## Packaging

- [ ] `scripts/verify-release.ps1 -Version 0.7.0` succeeds.
- [ ] `scripts/verify-release.ps1 -Version 0.7.1` succeeds.
- [ ] `scripts/pack.ps1 -Configuration Release` creates exactly one expected `.pext`.
- [ ] Build output and `.pext` both contain `RuntimeTemplate\SwitchBootstrap.ps1`.
- [ ] Build and package contain no `.pdb`, source, temporary, or stale files.
Expand All @@ -52,12 +53,12 @@
- [ ] Repository description, topics, and license are set.
- [ ] Private vulnerability reporting is enabled.
- [ ] CI workflow succeeds.
- [ ] Tag `v0.7.0` creates a release with `.pext` and checksum.
- [ ] Release notes describe the Desktop → Fullscreen transition, fail-open behavior, and content-aware runtime synchronization.
- [ ] Tag `v0.7.1` creates a release with `.pext` and checksum.
- [ ] Release notes describe the high-DPI bootstrap sizing fix and confirm that the WPF/streaming paths are unchanged.

## Playnite add-on database

- [ ] GitHub release asset URL is live.
- [ ] `distribution/installer.yaml` verifies with Toolbox.
- [ ] `distribution/addon.yaml` verifies with Toolbox.
- [ ] Published store entry resolves `distribution/installer.yaml` and exposes version `0.7.0`; no database pull request is needed unless central metadata changes.
- [ ] Published store entry resolves `distribution/installer.yaml` and exposes version `0.7.1`; no database pull request is needed unless central metadata changes.