refactor: Move find_script_thread to gta_util

This commit is contained in:
Yimura 2022-01-08 01:43:04 +01:00
parent 1d6fa013de
commit 842bb3617a
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
2 changed files with 16 additions and 16 deletions

View File

@ -54,4 +54,20 @@ namespace big::gta_util
return;
}
}
inline GtaThread* find_script_thread(rage::joaat_t hash)
{
for (auto thread : *g_pointers->m_script_threads)
{
if (thread
&& thread->m_context.m_thread_id
&& thread->m_handler
&& thread->m_script_hash == hash)
{
return thread;
}
}
return nullptr;
}
}

View File

@ -17,22 +17,6 @@
namespace big
{
static GtaThread *find_script_thread(rage::joaat_t hash)
{
for (auto thread : *g_pointers->m_script_threads)
{
if (thread
&& thread->m_context.m_thread_id
&& thread->m_handler
&& thread->m_script_hash == hash)
{
return thread;
}
}
return nullptr;
}
hooking::hooking() :
m_swapchain_hook(*g_pointers->m_swapchain, hooks::swapchain_num_funcs),
// SetCursorPos