mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00
refactor: Move find_script_thread to gta_util
This commit is contained in:
parent
121553a3f5
commit
a3b2d8ffef
@ -54,4 +54,20 @@ namespace big::gta_util
|
|||||||
return;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,22 +17,6 @@
|
|||||||
|
|
||||||
namespace big
|
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() :
|
hooking::hooking() :
|
||||||
m_swapchain_hook(*g_pointers->m_swapchain, hooks::swapchain_num_funcs),
|
m_swapchain_hook(*g_pointers->m_swapchain, hooks::swapchain_num_funcs),
|
||||||
// SetCursorPos
|
// SetCursorPos
|
||||||
|
Loading…
x
Reference in New Issue
Block a user