psxmode: Correct exe name for several PSX titles

Several PSX titles lack a backslash in the elf path, which made the disc
serial contain 'cdrom:', this caused savestate issues in those ganes.

Solves: https://github.com/PCSX2/pcsx2/issues/1692
This commit is contained in:
FlatOutPS2 2016-12-13 17:32:26 +01:00
parent 61669d1f3f
commit ff98dac104
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ void cdvdReloadElfInfo(wxString elfoverride)
// PCSX2 currently only recognizes *.elf executables in proper PS2 format.
// To support different PSX titles in the console title and for savestates, this code bypasses all the detection,
// simply using the exe name, stripped of problematic characters.
wxString fname = elfpath.AfterLast('\\');
wxString fname = elfpath.AfterLast('\\').AfterLast(':'); // Also catch elf paths which lack a backslash, and only have a colon.
wxString fname2 = fname.BeforeFirst(';');
DiscSerial = fname2;
Console.SetTitle(DiscSerial);