Skip to content

Instantly share code, notes, and snippets.

@Nun-z
Created February 26, 2020 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nun-z/422d42c8b5bd4ff7c05df934c8a66332 to your computer and use it in GitHub Desktop.
Save Nun-z/422d42c8b5bd4ff7c05df934c8a66332 to your computer and use it in GitHub Desktop.
ChangeDisplaySettings( (ClrDep:=32) , (Wid:=3840) , (Hei:=2160) , (Hz:=60) )
ChangeDisplaySettings( cD, sW, sH, rR ) {
  VarSetCapacity(dM,156,0), NumPut(156,dM,36)
  DllCall( "EnumDisplaySettingsA", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
  NumPut(cD,dM,104),  NumPut(sW,dM,108),  NumPut(sH,dM,112),  NumPut(rR,dM,120)
  Return DllCall( "ChangeDisplaySettingsA", UInt,&dM, UInt,0 )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment