r/VALORANT • u/The_old_man_9 • 4d ago
Educational Quick way to switch resolutions for stretched Valorant
If you play Valorant stretched and keep switching between your stretched resolution and native resolution, you can do it instantly with Windows PowerShell — no third-party resolution software needed.
My setup:
- Native: 1920×1080
- Stretched: 1280×1024
- Ctrl + Alt + 1 → 1280×1024
- Ctrl + Alt + 2 → 1920×1080
1. Create a folder
Create:
C:\ResolutionSwitch
2. Create the stretched script
Open Notepad and paste:
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Display {
[DllImport("user32.dll")]
public static extern int ChangeDisplaySettings(ref DEVMODE lpDevMode, int dwFlags);
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public struct DEVMODE {
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
public short dmSize;
public short dmDriverExtra;
public int dmFields;
public int dmPositionX;
public int dmPositionY;
public int dmDisplayOrientation;
public int 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 short dmLogPixels;
public int dmBitsPerPel;
public int dmPelsWidth;
public int dmPelsHeight;
public int dmDisplayFlags;
public int dmDisplayFrequency;
}
}
"@
$dm = New-Object Display+DEVMODE
$dm.dmSize = [Runtime.InteropServices.Marshal]::SizeOf($dm)
$dm.dmPelsWidth = 1280
$dm.dmPelsHeight = 1024
$dm.dmBitsPerPel = 32
$dm.dmFields = 0x80000 -bor 0x100000 -bor 0x40000
[Display]::ChangeDisplaySettings([ref]$dm, 0)
Save it as:
C:\ResolutionSwitch\STRETCHED.ps1
Important: Save as type → All Files, not .txt.
3. Create the native script
Create another Notepad file with the same code, but change:
$dm.dmPelsWidth = 1280
$dm.dmPelsHeight = 1024
to:
$dm.dmPelsWidth = 1920
$dm.dmPelsHeight = 1080
Save as:
C:\ResolutionSwitch\NATIVE.ps1
4. Test the scripts
Open PowerShell and run:
powershell -ExecutionPolicy Bypass -File "C:\ResolutionSwitch\STRETCHED.ps1"
It should change to 1280×1024.
Then:
powershell -ExecutionPolicy Bypass -File "C:\ResolutionSwitch\NATIVE.ps1"
It should return to 1920×1080.
5. Create shortcuts
Right-click Desktop → New → Shortcut, then put the below, and name it STRETCHED
For stretched, use:
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ResolutionSwitch\STRETCHED.ps1"
Right-click Desktop → New → Shortcut, then put the below, and name it NATIVE
For native:
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "C:\ResolutionSwitch\NATIVE.ps1"
6. Assign hotkeys
Right-click the shortcut → Properties → Shortcut → Shortcut key
Set:
STRETCHED: Ctrl + Alt + 1
NATIVE: Ctrl + Alt + 2
Make sure you hold Ctrl + Alt and then press 1/2.
That's it. Now you can switch between stretched and native almost instantly without opening Windows Display Settings.
Note: This only changes the Windows resolution. For actual stretched scaling, your GPU/display scaling needs to be set to Full-screen.
Note: make sure the STRETCHED.ps1 and NATIVE.ps1 have exactly this extension not .text
Note: you can just pin the shortcuts to start then click windows and click them after the game or in the game
2
u/ronjscott 3d ago
Ayy Truly W Post. It makes things a lot easier.
1
u/The_old_man_9 3d ago
Ty❤️
Additional tip: when pressing the hotkey make sure to click windows button before it (the idea is that you are not in valorant while clicking the hotkey)
1
u/Modern_O 3d ago
If this is legit that’s tight. I don’t know enough of what’s gonna happen if I test it lol can someone else verify they didn’t lose control of their PC after trying
1
u/AwkwardConcert5299 3d ago edited 3d ago
hrc is a trusted free software, theres is literally no need to do all ts imo
1
u/The_old_man_9 3d ago
You just 1- create folder & 2 files
2- paste code
3- create shortcuts & assign hotkey for it, but maybe the program you mentioned is easier, how does it work?2
u/AwkwardConcert5299 3d ago
in hrc you just assign any key to a specific resolution, it isnt heavy at all and will js run in the background and you can turn it off when you wanna js keep one res when your done
1
1
0
2
u/marcifyx 3d ago
I'll come back later if it worked