I am trying to change the windows display configuration from python with the pywin32 library, I have managed to change the resolution but when trying to change the scale there are no changes or errors, my function is like this:
import win32api
import win32con
import pywintypes
def set_res(width, height):
devmode = pywintypes.DEVMODEType()
devmode.PelsWidth = width
devmode.PelsHeight = height
devmode.Scale = 125
devmode.Fields = win32con.DM_PELSWIDTH | win32con.DM_PELSHEIGHT | win32con.DM_SCALE
win32api.ChangeDisplaySettings(devmode, win32con.CDS_RESET)
As a result, the resolution is changed but the scale is not.