mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 15:17:23 +08:00

* feat(Spoofing): add spoofing * feat(Spoofing): prepare code for player attach * remove(PlayerAttach): isn't going to work due to netsync architecture * fix(GUI): fix scaling * feat(Project): add clang-format file * feat(Classes): update classes * fix(BlackHole): remove unnecessary cleanup * fix(Formatting): fix formatting for initializer lists * feat(clang-format): Set tab width and 1 space before comment Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com>
32 lines
832 B
C++
32 lines
832 B
C++
#include "hooking.hpp"
|
|
#include "renderer.hpp"
|
|
#include "script.hpp"
|
|
|
|
namespace big
|
|
{
|
|
HRESULT hooks::swapchain_resizebuffers(IDXGISwapChain* this_, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT new_format, UINT swapchain_flags)
|
|
{
|
|
TRY_CLAUSE
|
|
{
|
|
if (g_running)
|
|
{
|
|
g_renderer->pre_reset();
|
|
|
|
const auto result = g_hooking->m_swapchain_hook.get_original<decltype(&swapchain_resizebuffers)>(swapchain_resizebuffers_index)(this_, buffer_count, width, height, new_format, swapchain_flags);
|
|
|
|
if (SUCCEEDED(result))
|
|
{
|
|
g_renderer->post_reset();
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
return g_hooking->m_swapchain_hook.get_original<decltype(&swapchain_resizebuffers)>(swapchain_resizebuffers_index)(this_, buffer_count, width, height, new_format, swapchain_flags);
|
|
}
|
|
EXCEPT_CLAUSE
|
|
|
|
return NULL;
|
|
}
|
|
}
|