Remove crash file
This commit is contained in:
parent
ff59d3efa9
commit
45ec89f98d
@ -74,6 +74,16 @@ namespace
|
|||||||
utils::hook::set(utils::nt::library{}.get_iat_entry("kernel32.dll", "ExitProcess"), exit_hook);
|
utils::hook::set(utils::nt::library{}.get_iat_entry("kernel32.dll", "ExitProcess"), exit_hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void remove_crash_file()
|
||||||
|
{
|
||||||
|
const utils::nt::library game{};
|
||||||
|
const auto game_file = game.get_path();
|
||||||
|
auto game_path = std::filesystem::path(game_file);
|
||||||
|
game_path.replace_extension(".start");
|
||||||
|
|
||||||
|
utils::io::remove_file(game_path.generic_string());
|
||||||
|
}
|
||||||
|
|
||||||
bool run()
|
bool run()
|
||||||
{
|
{
|
||||||
srand(uint32_t(time(nullptr)) ^ ~(GetTickCount() * GetCurrentProcessId()));
|
srand(uint32_t(time(nullptr)) ^ ~(GetTickCount() * GetCurrentProcessId()));
|
||||||
@ -91,6 +101,7 @@ namespace
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
patch_imports();
|
patch_imports();
|
||||||
|
remove_crash_file();
|
||||||
|
|
||||||
if (!component_loader::pre_start())
|
if (!component_loader::pre_start())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user