Moved port cvars out of display update

This commit is contained in:
KiritoDv
2024-12-27 17:46:16 -06:00
committed by Lywx
parent 745af556ca
commit e4d4388179
8 changed files with 195 additions and 166 deletions
+3 -9
View File
@@ -37,9 +37,7 @@
#include <VertexFactory.h>
#include "audio/GameAudio.h"
#include "port/patches/DisplayListPatch.h"
#include "port/hooks/impl/EventSystem.h"
#include "port/hooks/Events.h"
#include "port/mods/PortEnhancements.h"
#include <Fast3D/gfx_pc.h>
#include <SDL2/SDL.h>
@@ -188,15 +186,11 @@ void GameEngine::Create() {
#if defined(__SWITCH__) || defined(__WIIU__)
CVarRegisterInteger("gControlNav", 1); // always enable controller nav on switch/wii u
#endif
EventSystem::Instance->RegisterListener(EVENT_PLAYER_SHOT, EVENT_PRIORITY_NORMAL, [](IEvent* event) {
auto pse = (PlayerShotEvent*) event;
SPDLOG_INFO("Player shot event fired for actor {}", pse->actorId);
});
PortEnhancements_Init();
}
void GameEngine::Destroy() {
PortEnhancements_Exit();
AudioExit();
free(MemoryPool.memory);
}