This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/hooks/script/gta_thread_start.cpp

21 lines
603 B
C++
Raw Normal View History

#include "hooking.hpp"
#include "native_hooks/native_hooks.hpp"
namespace big
{
GtaThread* hooks::gta_thread_start(unsigned int** a1, unsigned int a2)
{
GtaThread* new_thread = g_hooking->get_original<hooks::gta_thread_start>()(a1, a2);
if (const char* name = new_thread->m_name; strlen(name) > 0)
{
if (g->notifications.gta_thread_kill.log)
LOG(INFO) << "Script Thread '" << name << "' started.";
if (g->notifications.gta_thread_kill.notify)
2022-10-24 14:08:37 +02:00
g_notification_service->push("Script Thread Startup", std::format("Script Thread '{}' started.", name));
}
return new_thread;
}
}