Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <MsgBoxConstants.au3>
- ; This script resizes Dolphin Emulator's window automatically by manually entering a width and height for the game being played.
- ; Great for native resolution screenshots. https://www.mariowiki.com/User:Wildgoosespeeder/sandbox#GCN/Wii
- ; This removes trial and error from the window resizing process due to a bug in the emulator's code, if the game's resolution is known.
- ; If running Dolphin Emulator as administrator, AutoIt needs to run in this mode too, or else the script doesn't work.
- ; Script designed with development builds of Dolphin Emulator after 5.0 release with emulation render in main window, not separate window. Can be adjusted.
- ; 16px for QT width, 121px for QT height. 40px QT height if render is in a separate window.
- ; Can be adjusted if running on something other than Windows 10 Build 21H2 or end result is wrong.
- Local $sQTW = 16
- Local $sQTH = 121
- ; Define variables
- Local $sWidth = Int(InputBox("Dolphin Emulator Question", "How wide is the game at native resolution?", "640"))
- Local $sHeight = Int(InputBox("Dolphin Emulator Question", "How tall is the game at native resolution?", "480"))
- ; User input requested
- MsgBox($MB_SYSTEMMODAL, "ALERT: Change To Emulator Window", "After pressing OK, switch to the window where the emulation is displaying. You have 5 seconds or the script produces an error. Verify the resize by taking a screenshot (F9). Adjust emulator and script settings accordingly if PNG is not " & $sWidth & "x" & $sHeight & " for the game.")
- ; Hook into process by allowing 5 seconds for user
- Local $hWnd = WinWaitActive("[CLASS:Qt5150QWindowIcon]", "", 5)
- ; Apply the user input to the QT width and height.
- $sQTW += $sWidth
- $sQTH += $sHeight
- ; Resize and center the window
- WinMove($hWnd, "", Int(@DesktopWidth / 2) - ($sQTW / 2), Int(@DesktopHeight / 2) - ($sQTH / 2), Int($sQTW), Int($sQTH), 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement