mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-19 06:22:17 +00:00
Preliminary mid-asm hook for gracefully exiting the game
This commit is contained in:
parent
b7b18f7476
commit
f68f720b17
5 changed files with 28 additions and 0 deletions
|
|
@ -46,6 +46,7 @@ set(SWA_UI_CXX_SOURCES
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SWA_CXX_SOURCES
|
set(SWA_CXX_SOURCES
|
||||||
|
"game.cpp"
|
||||||
"main.cpp"
|
"main.cpp"
|
||||||
"misc_impl.cpp"
|
"misc_impl.cpp"
|
||||||
|
|
||||||
|
|
|
||||||
12
UnleashedRecomp/game.cpp
Normal file
12
UnleashedRecomp/game.cpp
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
9
UnleashedRecomp/game.h
Normal file
9
UnleashedRecomp/game.h
Normal file
|
|
@ -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_82BEA7C0);
|
||||||
GUEST_FUNCTION_STUB(sub_82BFFF88); // D3DXFilterTexture
|
GUEST_FUNCTION_STUB(sub_82BFFF88); // D3DXFilterTexture
|
||||||
GUEST_FUNCTION_STUB(sub_82E9EF90); // D3DXFillTexture
|
GUEST_FUNCTION_STUB(sub_82E9EF90); // D3DXFillTexture
|
||||||
|
GUEST_FUNCTION_STUB(sub_82BD96D0);
|
||||||
|
|
|
||||||
|
|
@ -103,3 +103,8 @@ registers = ["f13"]
|
||||||
name = "Primitive2DHalfPixelOffsetMidAsmHook"
|
name = "Primitive2DHalfPixelOffsetMidAsmHook"
|
||||||
address = 0x830D213C
|
address = 0x830D213C
|
||||||
registers = ["f13"]
|
registers = ["f13"]
|
||||||
|
|
||||||
|
[[midasm_hook]]
|
||||||
|
name = "GracefulLoopExitMidAsmHook"
|
||||||
|
address = 0x822C1018
|
||||||
|
return_on_true = true
|
||||||
Loading…
Add table
Reference in a new issue