Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fixed][Win32] Load games from command line and unicode filenames
#1
Hi,
thank you so much for this awesome PSP emulator for Windows. I'm implementing Unicode support in my frontend EmuCon, and I'm trying to load games with Unicode filename. The frontend have a PSP system and PPSSPP is supported. Smile

I'm using latest PPSSPP build v0.9.9.1-155-gc5e80d0 for Windows.
The emulator load unicode iso files just fine within its internal select file dialog.
But it fails to load the game from from the command line.
I wonder if PPSSPP support WideString parameters in the command line ?

Other emulators load Unicode filenames just fine so, I know it's not my frontend causing this. Also, other PSP games with ANSI filenames load OK from command line in PPSSPP
Code:
"D:\emulators\PSP\ppsspp\PPSSPPWindows64.exe" "D:\emulators\PSP\games\究極魔界ゴブリン.iso" --escapeexitsemu

Thank you.
Reply
#2
Currently no, it uses "ANSI" to read the command-line since we haven't written the code to parse it as wide.

Quote:Note that lpCmdLine uses the LPSTR data type instead of the LPTSTR data type. This means that WinMain cannot be used by Unicode programs.

http://msdn.microsoft.com/en-us/library/ms633559.aspx

It shouldn't be hard to convert it to use wide strings though (as far as I know, only WinMain and Config::Load would need adjustment..).
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#3
Cool. No need to rush though.
My frontend uses the CreateProcessW API to execute external applications. The frontend is a Win32 application and coded in Borland Delphi 7 (no Unicode support whatsoever), but I implemented a few workarounds to make it work Smile
Reply
#4
I've got some preliminary code allowing for the game path (or filename, either or) to contain Unicode characters, but savestates, config inis, and log files won't work from the command-line as of yet. I'll work on this a bit more later. Time for a break.

Edit: Moved to Development since I started working on it.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#5
wow. That's a lot of work to be done. I only asked about loading unicode files from command line. The other extra files really need to be changed as well ?
Reply
#6
It makes more sense to do it for all arguments that use a file path rather than just one. I'm sure someone would have asked for them all to work eventually, anyway.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#7
https://github.com/hrydgard/ppsspp/pull/6816

That should wrap this up once it's merged.

This has been merged, please check the latest development build(s) for improvements.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply
#8
Holy Cow! Just tested new build v0.9.9.1-186-g612cc37. It works. Smile
Thank you so much. I didn't expect it would be implemented that quickly...
Reply
#9
No problem.
4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Reply


Forum Jump: