This game might give trouble to people using HDR on Windows when they try to play it in fullscreen or borderless fullscreen. The guide talks about the issue and suggests a couple of ways to solve it.
The Problem
Project Zomboid seems to create issues on Windows when HDR is turned on. When the game is in Fullscreen or Borderless Fullscreen mode, HDR turns off each time you click on the window.
For me, the problem is more intense as my entire monitor has to reset itself, leading to a blackout for 2-3 seconds whenever HDR is switched on or off. This means that if I accidentally click off-screen or press the Windows key by mistake, I experience a few seconds of black screen. Additionally, as soon as I click back onto the game, another few seconds of black screen occur.
Given the nature of Project Zomboid, even a few seconds of black screen can result in getting bitten or an instant death. I’ve checked the Steam discussion page and found that I’m not the only one facing this issue. While there are some suggested solutions, none of them suit my preferences. So, I used my problem-solving skills to find my own solution, and in this guide, I’ll share both solutions.
Fix #1: Disable HDR
The easiest and most direct solution is to go into your Windows settings and turn off HDR completely. It might feel disappointing, especially if you invested in an HDR monitor, but this is a quick fix for those who just want a simple solution.
Here are the steps:
- Open Windows Settings.
- Choose ‘Display.’
- In the ‘Brightness & color’ section, find ‘Use HDR.’
- Make sure to toggle the button to ‘off.’
Keep in mind that you can turn it back on manually using the same steps after you finish playing.
Fix #2: Run Project Zomboid in Windowed Mode
You won’t face the problem of HDR turning on and off if you set the game to Windowed mode. If you’re okay with having the Windows title bar and taskbar on the screen while playing (which I personally can’t tolerate), you can go to the in-game Options menu and switch it to Windowed mode to avoid the HDR issue.
Fix #3: Hack Window Styles
If changing HDR settings before playing the game is too bothersome, or if dealing with the distractions of the taskbar and menubar in Windowed mode is equally undesirable, I have another option for you. We’ll run the game in Windowed mode, and then use a PowerShell script to access some System32 methods to remove the menubar from the game window. The end result will essentially look the same as Borderless Fullscreen without encountering the HDR problem.
Follow these steps:
- Download a copy of my script from here: Link to Script
The script consists of two parts:
pz.ps1
: PowerShell script file with code to pull methods from user32.dll to search for a window named “Project Zomboid” and apply window styling and sizing.PZ_Window_Fix.bat
: Batch file that launches PowerShell and runspz.ps1
.
It doesn’t matter where you put the files; they just need to be in the same folder.
Note: My script is designed for a 4k monitor. If you have a different screen resolution, open pz.ps1
with Notepad or a similar text editor, and change the values at the top from 3840 and 2160 to the width and height of your screen.
If you have a 1080p screen, for instance, make sure to adjust the script by changing the values to 1920 and 1080.
After configuring the script for your screen size, follow these steps:
- Launch the game, ensuring it’s running in Windowed mode and the window is not maximized.
- Double-click
PZ_Window_Fix.bat
.
This action executes the script, removing the borders from the game window and filling the screen.
There’s a small annoyance that I haven’t found a solution for yet. Occasionally, the taskbar may get stuck over the bottom of the game window even when it’s in focus. To fix this issue, follow these steps:
- After running the script, go to the game settings.
- Change the resolution back to your screen size.
This should remedy the problem and ensure that the taskbar doesn’t persistently overlay the bottom of the game window when it’s focused.
That's everything we are sharing today for this Project Zomboid guide. This guide was originally created and written by Sunderbraze. In case we fail to update this guide, you can find the latest update by following this link.