refactor: Renderer (#694)

* Simplified SwapCHain, Device and DeviceContext pointers
* Added DX and WndProc callback registration
* Cleaned up GUI code
* Optimised Mouse Toggle
This commit is contained in:
Yimura
2022-12-16 18:55:55 +01:00
committed by GitHub
parent 0e6547b519
commit d624f1aaa1
15 changed files with 219 additions and 131 deletions

View File

@ -10,7 +10,7 @@ namespace big
{
if (g->weapons.rapid_fire)
{
if(!HUD::IS_PAUSE_MENU_ACTIVE() && !g_gui.m_opened && !PED::IS_PED_DEAD_OR_DYING(self::ped, true))
if(!HUD::IS_PAUSE_MENU_ACTIVE() && !g_gui->is_open() && !PED::IS_PED_DEAD_OR_DYING(self::ped, true))
{
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_ATTACK))
{

View File

@ -17,7 +17,7 @@ namespace big
const auto elapsed_time_in_ms = std::chrono::duration_cast<std::chrono::milliseconds>(time_now - last_time).count();
if (is_vehicle_gun_selected &&
!g_gui.m_opened &&
!g_gui->is_open() &&
elapsed_time_in_ms >= 100 &&
PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_ATTACK))
{