Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Fixed][Win32] Load games from command line and unicode filenames
08-29-2014, 06:53 PM (This post was last modified: 08-31-2014 05:23 PM by TheDax.)
Post: #1
[Fixed][Win32] Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
08-29-2014, 10:08 PM (This post was last modified: 08-29-2014 11:05 PM by TheDax.)
Post: #2
RE: Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
08-29-2014, 11:26 PM (This post was last modified: 08-29-2014 11:28 PM by CiroConsentino.)
Post: #3
RE: [Win32] Load games from command line and unicode filenames
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
Find all posts by this user
Quote this message in a reply
08-30-2014, 12:21 AM (This post was last modified: 08-30-2014 12:36 AM by TheDax.)
Post: #4
RE: [Win32] Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
08-30-2014, 01:36 PM
Post: #5
RE: [Win32] Load games from command line and unicode filenames
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 ?
Find all posts by this user
Quote this message in a reply
08-30-2014, 04:52 PM
Post: #6
RE: [Win32] Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
08-31-2014, 04:26 AM (This post was last modified: 08-31-2014 06:34 AM by TheDax.)
Post: #7
RE: [Win32] Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
08-31-2014, 02:39 PM
Post: #8
RE: [Win32] Load games from command line and unicode filenames
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...
Find all posts by this user
Quote this message in a reply
08-31-2014, 05:23 PM
Post: #9
RE: [Win32] Load games from command line and unicode filenames
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: