Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Please note that you can build the hardened version only if you have access to i
- Game speed slider toggle
- Revert of Battle Fortress cloak changes for CnCNet YR
- Ability to disable ingame chat
- **[Noble Fish](https://github.com/DeathFishAtEase)**
- Improve QuickExit so that the normal exit process also has the speed of <kbd>Alt</kbd>+<kbd>F4</kbd>
- **[TaranDahl](https://github.com/TaranDahl)**
- Porting of multiplayer save/load
- Porting of autosaves
Expand Down
16 changes: 16 additions & 0 deletions src/Misc/QuickExit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,19 @@ DEFINE_HOOK(0x623125, OwnerDrawLoop_HandleRageQuit, 0x5)
? 0x623157
: 0;
}

DEFINE_HOOK(0x6BE091, WinMain_AfterGameLoop_HandleQuickExit, 0x6)
{
if (Main::GetConfig()->QuickExit)
ExitProcess(0);

return 0;
}

DEFINE_HOOK(0x686570, DisconnectGracefully_HandleQuickExit, 0x5)
{
if (Main::GetConfig()->QuickExit)
ExitProcess(0);

return 0;
}
Loading