mirror of https://github.com/PCSX2/pcsx2.git
ipc: implement MsgGameVersion
This commit is contained in:
parent
434a06cb72
commit
bc6e5213a0
|
@ -19,6 +19,7 @@
|
||||||
#include "GS.h" // for sending game crc to mtgs
|
#include "GS.h" // for sending game crc to mtgs
|
||||||
#include "Elfheader.h"
|
#include "Elfheader.h"
|
||||||
#include "DebugTools/SymbolMap.h"
|
#include "DebugTools/SymbolMap.h"
|
||||||
|
#include "AppCoreThread.h"
|
||||||
|
|
||||||
u32 ElfCRC;
|
u32 ElfCRC;
|
||||||
u32 ElfEntry;
|
u32 ElfEntry;
|
||||||
|
@ -347,6 +348,7 @@ int GetPS2ElfName( wxString& name )
|
||||||
else if( parts.lvalue == L"VER" )
|
else if( parts.lvalue == L"VER" )
|
||||||
{
|
{
|
||||||
Console.WriteLn( Color_Blue, L"(SYSTEM.CNF) Software version = " + parts.rvalue );
|
Console.WriteLn( Color_Blue, L"(SYSTEM.CNF) Software version = " + parts.rvalue );
|
||||||
|
GameInfo::gameVersion = parts.rvalue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -449,6 +449,19 @@ SocketIPC::IPCBuffer SocketIPC::ParseCommand(char* buf, char* ret_buffer, u32 bu
|
||||||
ret_cnt += 256;
|
ret_cnt += 256;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case MsgGameVersion:
|
||||||
|
{
|
||||||
|
if (!m_vm->HasActiveMachine())
|
||||||
|
goto error;
|
||||||
|
if (!SafetyChecks(buf_cnt, 0, ret_cnt, 256, buf_size))
|
||||||
|
goto error;
|
||||||
|
char version[256] = {};
|
||||||
|
sprintf(version, "%s", GameInfo::gameVersion.ToUTF8().data());
|
||||||
|
version[255] = 0x00;
|
||||||
|
memcpy(&ret_buffer[ret_cnt], version, 256);
|
||||||
|
ret_cnt += 256;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
error:
|
error:
|
||||||
|
|
|
@ -102,6 +102,7 @@ protected:
|
||||||
MsgTitle = 0xB, /**< Returns the game title. */
|
MsgTitle = 0xB, /**< Returns the game title. */
|
||||||
MsgID = 0xC, /**< Returns the game ID. */
|
MsgID = 0xC, /**< Returns the game ID. */
|
||||||
MsgUUID = 0xD, /**< Returns the game UUID. */
|
MsgUUID = 0xD, /**< Returns the game UUID. */
|
||||||
|
MsgGameVersion = 0xE, /**< Returns the game verion. */
|
||||||
MsgUnimplemented = 0xFF /**< Unimplemented IPC message. */
|
MsgUnimplemented = 0xFF /**< Unimplemented IPC message. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace GameInfo
|
||||||
wxString gameName;
|
wxString gameName;
|
||||||
wxString gameSerial;
|
wxString gameSerial;
|
||||||
wxString gameCRC;
|
wxString gameCRC;
|
||||||
|
wxString gameVersion;
|
||||||
}; // namespace GameInfo
|
}; // namespace GameInfo
|
||||||
|
|
||||||
// --------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace GameInfo
|
||||||
extern wxString gameName;
|
extern wxString gameName;
|
||||||
extern wxString gameSerial;
|
extern wxString gameSerial;
|
||||||
extern wxString gameCRC;
|
extern wxString gameCRC;
|
||||||
|
extern wxString gameVersion;
|
||||||
}; // namespace GameInfo
|
}; // namespace GameInfo
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue