kwsch / PKHeX

Pokémon Save File Editor
https://projectpokemon.org/pkhex/
Other
3.71k stars 696 forks source link

Pkhex potential false error thread's dpi awareness context not set #4318

Closed Wolf-lbh closed 3 months ago

Wolf-lbh commented 3 months ago

When running pkhex in wine it will load as long as dot net desktop 8 is installed and all the buttons and features work, however when you try to use any of the toolbar buttons such as “file", “tools", or “options" it will show the dropdown menu perfectly for a split second and then crash and list a bunch of win32 services with the thread's dpi awareness context not set. This makes it impossible to select a save file to edit. I looked into it as far as I was able to understand and evidently it has something to do with screen resolution but as the menus display perfectly for a second prior to the crash I believe this check might not be needed and I was wondering if it could be disabled?

If not would it be possible to have pkhex check for wine/Linux DPI settings? This would open pkhex up to the entire Linux community and also I could sleep at night again and that would be super cool of you.

Wolf-lbh commented 3 months ago

This is still an improvement you can make but I was able to get it working so I'm going to mark it as closed. When I checked to make sure the version of Wine bundled with Winlator 7.1 was up to date it said 9.2 (custom) and the github for Wine said 9.12 was the latest version which my sleep deprived brain read as 9.1.2 and I didn't realize that 12 was in fact higher than 2 thus leading me to waste like 12 hours of my time over 3 days.

For anyone interested in getting it working the answer was: Download Wine 9.12 x64 from github Install Wine 9.12 x64 in Winlator settings Make a Winlator container using Wine 9.12 (not Wine 9.2 which is currently the default) Make sure the Winlator container is set to have the D drive in a folder you can access on your phone (by default mine wasn't) Download Dot Net Desktop 8.0.5 x64 (or higher) and place it in the folder you set to be your D drive Place PKhex in the folder you set to be your D drive Launch the container and open the start menu and click "Install Wine Mono" Run the Dot Net Desktop 8 installer Run Pkhex

Note that when you go to load the save file (Just put the save file you want to edit in the D drive folder) there is like a 50% chance Winlator will crash at this point but you just run the container again so I don't care. Also you will need to click pkhex.exe like 100 times to get it to launch, just keep spam clicking. And while you could use Winlators xinput emulated controls you are going to have a much better time with a bluetooth mouse and keyboard.