Dolphin 3.0 (x86/x64)
Main Window Position (Fix) / Taskbar Fullscreen Mode (Fix)
***
***
I recently came across Dolphin while setting up a number of emulators for my new PC build and decided to try out the (stable) v3.0 x64 release. While playing about and configuring the emulator, I discovered that all of a sudden the main window would not display onscreen when starting up Dolphin (requiring the Win+Up Arrow key shortcut available in Windows 7 to maximize the active window). On searching the Dolphin forums / Google for information on a fix, I discovered that this is a known bug (occurring in both x86 and x64 versions), and is a result of the MainWindowPosX / MainWindowPosY variables in the Dolphin.ini configuration file, being overwritten with random values (commonly -32000).
There seems to be no definitive explanation for the cause of the problem, and the only solutions I can find online are: to either simply use the Windows key shortcut to maximize the window each time the application is run, or to manually open the configuration file and reset the window position variables to zero whenever they get overwritten (the default setting is X = 100 / Y = 100). I have also come across suggestions to delete the configuration file (or even perform a clean install of Dolphin!) however this will not eliminate the bug, and therefore is not recommended!
I can confirm this problem will affect users running Windows 7 x64 with high DPI settings, however I do not know for certain if the glitch occurs in other Windows versions / when DPI is set lower than 150%). I currently use a 40" LCD TV as my monitor with a desktop resolution of 1920x1080p / 60Hz with DPI set at 150%, and I believe this to be the main cause of the problem. I (briefly) tested running Dolphin with DPI 125% which seemed to fix the issue (unable to replicate bug), however at this setting, system text is too small to read comfortably, and would therefore not be a practical solution for people running at DPI 150% on large monitors.
After testing both x86/x64 versions of v3.0 over a couple of days, I have discovered that the glitch reoccurs randomly after completing certain events. I have sometimes noticed it happen after editing the 'Emulation State' textbox for a game (properties), or after a crash caused by trying to open a WiiWare save folder, however recreating the steps does not always invoke the bug.
To provide a permanent solution for this issue, I have created a script (Dolphin 3.0 Launcher) that resets the configuration Window Position values to zero and launches Dolphin maximized with focus. After running the script once (and therefore resetting the window position), Dolphin can then be launched from the main executable until the glitch reoccurs. However, in addition to preventing the window from opening off-screen, the script provides the added bonus of opening Dolphin maximized, and can be used as the standard launcher if preferred. I have provided a direct download link to the script, and also included the code at the end of the post for anyone wishing to compile this themselves.
Dolphin 3.0 Launcher.vbs
*The script must be placed in the main (root) Dolphin install directory for it to be able to locate the configuration file / main executable!
*The script must be placed in the main (root) Dolphin install directory for it to be able to locate the configuration file / main executable!
It should be noted that this bug has been addressed in recent WIP builds, and therefore the fix is specifically designed for Dolphin 3.0, although it will work with any other affected versions that retains the same directory structure / configuration variables of v3.0.
***
Although this guide has predominately focused on the Main Window Position bug, as this issue appears to be unique to users running Windows 7 at 150% DPI, I am also going to cover another problem that will be encountered by anyone running x64 builds of Dolphin with high DPI settings.
On setting up my copy of Windows 7 for the first time, I quickly discovered that after changing my DPI (to 150%), certain applications would not display video correctly in fullscreen mode (i.e. PC games, YouTube videos etc.), allowing the desktop taskbar to remain visible at the bottom of the screen. In general, the solution to this problem is to open the application’s properties window, and select 'Disable display scaling on high DPI settings' from the compatibility tab. However, this option is only available for x86 applications and will be greyed out on the compatibility tab for x64 apps. Due to this, users who wish to run the x64 version of Dolphin 3.0 (at 150% DPI) will not be able to select the option to disable display scaling and will have the taskbar issue when running games fullscreen. To solve this problem, it is actually possible to disable display scaling by manually entering the setting direct to the registry.
Start the Windows Registry Editor (Start Menu/Run…/regedit), and navigate to the following location (the Layers folder stores the compatibility settings for applications that are applied to all users):
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Right-Click the Layers folder from the tree and create a new string value. The name field of the string should be set to the full pathname of the Dolphin executable (i.e. C:\Program Files\Dolphin\Dolphin.exe). Once this is set, Right-Click the string and select the modify option. You can now manually set whatever compatibility options you require by entering the appropriate keyword for the value data (the option to disable display scaling is set by using HIGHDPIAWARE).
***
If you found this guide useful, could you please confirm in the comments your OS / Dolphin build and DPI setting to help establish the conditions required for the Main Window Position bug to invoke.
***
'****************************************************************************
'DOLPHIN 3.0 LAUNCHER ~ CODEMONKEY1980
'****************************************************************************
Set objShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Set path of root directory
strFile = WScript.ScriptFullName
Set objFile = objFSO.GetFile(strFile)
strPath = objFSO.GetParentFolderName(objFile)
'Open Dolphin configuration file (Read I/O)
If Not objFSO.FileExists(strPath & "\User\Config\Dolphin.ini") Then
MsgBox "Dolphin.ini configuration file not found!",vbOkOnly,"Dolphin 3.0 Launcher"
WScript.Quit
Else
Set objFile = objFSO.OpenTextFile(strPath & "\User\Config\Dolphin.ini",1)
End If
'Read each line and replace MainWindowPosX/Y
Do While Not objFile.AtEndOfStream
strTemp = objFile.ReadLine
If InStr(strTemp,"MainWindowPosX") > 0 Then
strTemp = "MainWindowPosX = 0"
ElseIf InStr(strTemp,"MainWindowPosY") > 0 Then
strTemp = "MainWindowPosY = 0"
End If
'Append current line to strConfig variable
strConfig = strConfig & vbNewLine & strTemp
Loop
objFile.Close
'Open Dolphin configuration file (Write I/O)
Set objFile = objFSO.OpenTextFile(strPath & "\User\Config\Dolphin.ini",2)
'Rewrite file with modified configuration data
objFile.WriteLine strConfig
objFile.Close
Set objFSO = Nothing
'Launch Dolphin (Maximized/Focus)
strDolphin = """" & strPath & "\Dolphin.exe" & """"
objShell.Run strDolphin, 3
Set objShell = Nothing
'****************************************************************************