mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: Warn if GameDB section start tag is incorrect
This helps avoid patches not being applied due to whitespace mismatches. For example: [patches ] [ patches] [patches = 012345678]
This commit is contained in:
parent
f47321c287
commit
7433ee7fc1
|
@ -77,7 +77,11 @@ bool DBLoaderHelper::extractMultiLine() {
|
||||||
// Use Mid() to strip off the left and right side brackets.
|
// Use Mid() to strip off the left and right side brackets.
|
||||||
wxString midLine(m_dest.Mid(1, m_dest.Length()-2));
|
wxString midLine(m_dest.Mid(1, m_dest.Length()-2));
|
||||||
wxString lvalue(midLine.BeforeFirst(L'=').Trim(true).Trim(false));
|
wxString lvalue(midLine.BeforeFirst(L'=').Trim(true).Trim(false));
|
||||||
//wxString rvalue(midLine.AfterFirst(L'=').Trim(true).Trim(false));
|
wxString rvalue(midLine.AfterFirst(L'=').Trim(true).Trim(false));
|
||||||
|
|
||||||
|
wxString key = '[' + lvalue + (rvalue.empty() ? "" : " = ") + rvalue + ']';
|
||||||
|
if (key != m_keyPair.key)
|
||||||
|
Console.Warning("GameDB: Badly formatted section start tag.\nActual: " + m_keyPair.key + "\nExpected: " + key);
|
||||||
|
|
||||||
wxString endString;
|
wxString endString;
|
||||||
endString.Printf( L"[/%s]", lvalue.c_str() );
|
endString.Printf( L"[/%s]", lvalue.c_str() );
|
||||||
|
|
Loading…
Reference in New Issue