mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-05-01 15:59:26 -05:00
Preliminary mid-asm hook for gracefully exiting the game
This commit is contained in:
@@ -46,6 +46,7 @@ set(SWA_UI_CXX_SOURCES
|
||||
)
|
||||
|
||||
set(SWA_CXX_SOURCES
|
||||
"game.cpp"
|
||||
"main.cpp"
|
||||
"misc_impl.cpp"
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "game.h"
|
||||
|
||||
void Game::Exit()
|
||||
{
|
||||
s_isSignalExit = true;
|
||||
}
|
||||
|
||||
bool GracefulLoopExitMidAsmHook()
|
||||
{
|
||||
// TODO (Sajid): investigate XAM handle closing causing assertion failure here.
|
||||
return Game::s_isSignalExit;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
class Game
|
||||
{
|
||||
public:
|
||||
inline static bool s_isSignalExit = false;
|
||||
|
||||
static void Exit();
|
||||
};
|
||||
@@ -2541,3 +2541,4 @@ GUEST_FUNCTION_STUB(sub_82BEA018);
|
||||
GUEST_FUNCTION_STUB(sub_82BEA7C0);
|
||||
GUEST_FUNCTION_STUB(sub_82BFFF88); // D3DXFilterTexture
|
||||
GUEST_FUNCTION_STUB(sub_82E9EF90); // D3DXFillTexture
|
||||
GUEST_FUNCTION_STUB(sub_82BD96D0);
|
||||
|
||||
Reference in New Issue
Block a user