JacobMIX

GameStream Resolution AHK Script

Aug 6th, 2020
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. ```#NoEnv
  2. ; #Warn
  3. #SingleInstance, force
  4.  
  5. Proc = nvstreamer.exe //If this process is running change resolution to stream settings below
  6. cD1 = 32 //Default Color Detail - bits (quality)
  7. sW1 = 1920 //Default Screen With - Pixels
  8. sH1 = 1080 //Default Screen Hight - Pixels
  9. rR1 = 60 //Default Refresh Rate - Hz (frequency)
  10. cD2 = 32 //Streaming Color Detail - bits (quality)
  11. sW2 = 1280 //Streaming Screen With - Pixels
  12. sH2 = 720 //Streaming Screen Hight - Pixels
  13. rR2 = 60 //Streaming Refresh Rate - Hz (frequency)
  14.  
  15. ChangeDisplaySettings( cD, sW, sH, rR ) {
  16. VarSetCapacity(dM,156,0), NumPut(156,2,&dM,36)
  17. DllCall( "EnumDisplaySettingsA", UInt,0, UInt,-1, UInt,&dM ),
  18. NumPut(0x5c0000,dM,40)
  19. NumPut(cD,dM,104), NumPut(sW,dM,108), NumPut(sH,dM,112), NumPut(rR,dM,120)
  20. Return DllCall( "ChangeDisplaySettingsA", UInt,&dM, UInt,0 )
  21. }
  22.  
  23. Label1:
  24. Process, Wait, %Proc%
  25. ChangeDisplaySettings(%cD2%, %sW2%, %sH2%, %rR2%)
  26. MsgBox "Changed your resolution"
  27. Process, WaitClose, %Proc%.exe
  28. ChangeDisplaySettings(%cD1%, %sW1%, %sH1%, %rR1%)
  29. MsgBox "Restored your resolution"
  30.  
  31. Gosub, Label1```
Advertisement
Add Comment
Please, Sign In to add comment