Last active
February 15, 2025 12:03
-
-
Save Journalist-HK/cea66aef1eec1b2ed9ea204ea5c9a953 to your computer and use it in GitHub Desktop.
Change screen resfresh rate for Forza Motorsport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# New fresh rate for the game | |
$NewRate = 100 | |
# Change this if you have multiple monitors | |
$DID = 1 | |
# DELETE BELOW IF YOU HAVE ALREADY INSTALLED THE MODULE | |
# Check if PSGallery is trusted | |
$PSG = Get-PSRepository -Name PSGallery | |
if ($PSG.InstallationPolicy -ne "Trusted") { | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
} | |
# Check if DisplayConfig module is installed | |
if (-not (Get-Module -ListAvailable -Name DisplayConfig)) { | |
Install-Module -Name DisplayConfig -Scope CurrentUser -Force | |
} | |
# DELETE ABOVE IF YOU HAVE ALREADY INSTALLED THE MODULE | |
$Display = Get-DisplayInfo -DisplayId $DID | |
$RoundedHz = [System.Math]::Round($Display.Mode.RefreshRate) | |
Set-DisplayRefreshRate -DisplayId $DID -RefreshRate $NewRate -AllowChanges | |
# Xbox | |
Start-Process "shell:AppsFolder\Microsoft.ForzaMotorsport_8wekyb3d8bbwe!ReleaseFinal" | |
# Steam | |
# Start-Process "steam://rungameid/2440510" | |
Write-Output "Waiting main process" | |
Start-Sleep -Seconds 30 | |
# Xbox | |
Wait-Process -Name "forza_gaming.desktop.x64_release_final" | |
# Steam | |
# Wait-Process -Name "forza_steamworks_release_final" | |
Start-Sleep -Seconds 2 | |
Set-DisplayRefreshRate -DisplayId $DID -RefreshRate $RoundedHz -AllowChanges | |
Write-Output "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment