From ff98dac1047667b4abda8535910daf20df5731ec Mon Sep 17 00:00:00 2001 From: FlatOutPS2 Date: Tue, 13 Dec 2016 17:32:26 +0100 Subject: [PATCH] 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 --- pcsx2/CDVD/CDVD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 8b0f7ef9e0..73fbe508f8 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -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);