better console quit call

This commit is contained in:
quaK 2022-06-07 01:48:15 +03:00
parent 581c4fa312
commit a349d386cb
2 changed files with 2 additions and 3 deletions

View File

@ -5,10 +5,8 @@
#include "game/game.hpp"
#include <utils/flags.hpp>
#include <utils/nt.hpp>
#include <utils/concurrency.hpp>
#include <utils/thread.hpp>
#include <utils/string.hpp>
namespace
{
@ -115,7 +113,7 @@ namespace console
}
break;
case WM_CLOSE:
game::Cbuf_AddText(0, "quit\n");
game::Cbuf_AddCall(0, game::Com_Quit_f);
DestroyWindow(hwnd);
return 0;
case WM_CTLCOLOREDIT:

View File

@ -11,6 +11,7 @@ namespace game
WEAK symbol<void()> Com_Quit_f{ 0xBADC90 };
WEAK symbol<void(int localClientNum, const char* text)> Cbuf_AddText{ 0xB7C290 };
WEAK symbol<void(int localClientNum, void(*))> Cbuf_AddCall{ 0xB7C220 };
WEAK symbol<void(int localClientNum, int controllerIndex, const char* text)> Cmd_ExecuteSingleCommand{ 0xB7D040 };
WEAK symbol<void(const char* cmdName, void(), cmd_function_s* allocedCmd)> Cmd_AddCommandInternal{ 0xB7C8F0 };