
Related YimMenu/Translations#117 Closes #2723 Changes made: - Renderer class was changed to a static instance - Some throw code was removed because of change of instantiation of the renderer - Fonts are dynamically loaded based on the language requirements - renderer files have been moved to make the root directory less messy - Added a font mgr to improve the ease of adding more language support
26 lines
808 B
C++
26 lines
808 B
C++
#include "hooking/hooking.hpp"
|
|
#include "renderer/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)
|
|
{
|
|
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);
|
|
}
|
|
}
|