[BitMessage] Optimize shutdown handler
Optimize the shutdown handler, so that less bugs occur while waiting for BitMRC to terminate
This commit is contained in:
parent
9591d7eacd
commit
e41aa1f221
@ -15,7 +15,7 @@ namespace Components
|
|||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Logger::Print("Initializing BitMessage...\n");
|
Logger::Print("Initializing BitMessage...\n");
|
||||||
#endif // DEBUG
|
#endif
|
||||||
|
|
||||||
QuickPatch::OnShutdown([] ()
|
QuickPatch::OnShutdown([] ()
|
||||||
{
|
{
|
||||||
|
@ -15,10 +15,10 @@ namespace Components
|
|||||||
QuickPatch::ShutdownSignal.connect(callback);
|
QuickPatch::ShutdownSignal.connect(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickPatch::ShutdownStub(int channel, const char* message)
|
void QuickPatch::ShutdownStub(int num)
|
||||||
{
|
{
|
||||||
Game::Com_Printf(channel, message);
|
|
||||||
QuickPatch::ShutdownSignal();
|
QuickPatch::ShutdownSignal();
|
||||||
|
Utils::Hook::Call<void(int)>(0x46B370)(num);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickPatch::OnFrame(QuickPatch::Callback* callback)
|
void QuickPatch::OnFrame(QuickPatch::Callback* callback)
|
||||||
@ -323,7 +323,7 @@ namespace Components
|
|||||||
Utils::Hook::Set<char*>(0x60B279, CLIENT_CONFIG);
|
Utils::Hook::Set<char*>(0x60B279, CLIENT_CONFIG);
|
||||||
Utils::Hook::Set<char*>(0x60BBD4, CLIENT_CONFIG);
|
Utils::Hook::Set<char*>(0x60BBD4, CLIENT_CONFIG);
|
||||||
|
|
||||||
Utils::Hook(0x4D4007, QuickPatch::ShutdownStub, HOOK_CALL).Install()->Quick();
|
Utils::Hook(0x4D697A, QuickPatch::ShutdownStub, HOOK_CALL).Install()->Quick();
|
||||||
|
|
||||||
// Disable profile system
|
// Disable profile system
|
||||||
// Utils::Hook::Nop(0x60BEB1, 5); // GamerProfile_InitAllProfiles - Causes an error, when calling a harrier killstreak.
|
// Utils::Hook::Nop(0x60BEB1, 5); // GamerProfile_InitAllProfiles - Causes an error, when calling a harrier killstreak.
|
||||||
|
@ -24,7 +24,7 @@ namespace Components
|
|||||||
static wink::signal<wink::slot<Callback>> ShutdownSignal;
|
static wink::signal<wink::slot<Callback>> ShutdownSignal;
|
||||||
|
|
||||||
static int64_t* GetStatsID();
|
static int64_t* GetStatsID();
|
||||||
static void ShutdownStub(int channel, const char* message);
|
static void ShutdownStub(int num);
|
||||||
|
|
||||||
static void SelectStringTableEntryInDvarStub();
|
static void SelectStringTableEntryInDvarStub();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user