Fix errors

This commit is contained in:
Grinch_ 2022-08-20 15:34:15 +06:00
parent 6bd401afa0
commit 50c4e4235d
16 changed files with 172 additions and 144 deletions

View File

@ -60,7 +60,7 @@ static bool DrawTitleBar()
return pressed; return pressed;
} }
void CheatMenu::DrawWindow() void CheatMenu::Draw()
{ {
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
static bool bRunning = true; static bool bRunning = true;
@ -77,26 +77,30 @@ void CheatMenu::DrawWindow()
else else
{ {
bRunning = true; bRunning = true;
if (m_bShowMenu) if (m_bVisible)
{ {
ImGui::SetNextWindowSize(m_fMenuSize); ImGui::SetNextWindowSize(m_fSize);
if (ImGui::Begin(MENU_TITLE, NULL, ImGuiWindowFlags_NoCollapse || ImGuiWindowFlags_NoTitleBar)) if (ImGui::Begin(MENU_TITLE, NULL, ImGuiWindowFlags_NoCollapse || ImGuiWindowFlags_NoTitleBar))
{ {
m_bShowMenu = !DrawTitleBar(); m_bVisible = !DrawTitleBar();
ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(250, 350)); ImGui::PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(250, 350));
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,
ImVec2(ImGui::GetWindowWidth() / 85, ImGui::GetWindowHeight() / 200)); ImVec2(ImGui::GetWindowWidth() / 85, ImGui::GetWindowHeight() / 200));
PageHandler::DrawPages(); PageHandler::DrawPages();
if (m_bSizeChangedExternal) if (m_bSizeUpdated)
m_bSizeChangedExternal = false; {
m_bSizeUpdated = false;
}
else else
m_fMenuSize = ImGui::GetWindowSize(); {
m_fSize = ImGui::GetWindowSize();
}
gConfig.Set("Window.SizeX", m_fMenuSize.x); gConfig.Set("Window.SizeX", m_fSize.x);
gConfig.Set("Window.SizeY", m_fMenuSize.y); gConfig.Set("Window.SizeY", m_fSize.y);
ImGui::PopStyleVar(2); ImGui::PopStyleVar(2);
ImGui::End(); ImGui::End();
@ -114,15 +118,14 @@ void CheatMenu::Init()
return; return;
} }
if (!D3dHook::Init(DrawWindow)) if (!D3dHook::Init(Draw))
{ {
return; return;
} }
// Load menu settings // Load menu settings
// m_nMenuPage = (eMenuPages)gConfig.Get("Window.CurrentPage", (size_t)eMenuPages::WELCOME); m_fSize.x = gConfig.Get("Window.SizeX", screen::GetScreenWidth() / 4.0f);
m_fMenuSize.x = gConfig.Get("Window.SizeX", screen::GetScreenWidth() / 4.0f); m_fSize.y = gConfig.Get("Window.SizeY", screen::GetScreenHeight() / 1.2f);
m_fMenuSize.y = gConfig.Get("Window.SizeY", screen::GetScreenHeight() / 1.2f);
srand(CTimer::m_snTimeInMilliseconds); srand(CTimer::m_snTimeInMilliseconds);
ApplyStyle(); ApplyStyle();
@ -135,7 +138,7 @@ void CheatMenu::Init()
{ {
if (menuOpen.Pressed()) if (menuOpen.Pressed())
{ {
m_bShowMenu = !m_bShowMenu; m_bVisible = !m_bVisible;
} }
if (commandWindow.Pressed()) if (commandWindow.Pressed())
@ -144,14 +147,14 @@ void CheatMenu::Init()
} }
bool mouseState = D3dHook::GetMouseState(); bool mouseState = D3dHook::GetMouseState();
if (mouseState != m_bShowMenu) if (mouseState != m_bVisible)
{ {
if (mouseState) // Only write when the menu closes if (mouseState) // Only write when the menu closes
{ {
gConfig.Save(); gConfig.Save();
} }
D3dHook::SetMouseState(m_bShowMenu); D3dHook::SetMouseState(m_bVisible);
} }
if (teleportPage.IsQuickTeleportActive() && quickTeleport.PressedRealtime()) if (teleportPage.IsQuickTeleportActive() && quickTeleport.PressedRealtime())
@ -162,9 +165,9 @@ void CheatMenu::Init()
}; };
} }
bool CheatMenu::IsBeingDrawn() bool CheatMenu::IsVisible()
{ {
return m_bShowMenu; return m_bVisible;
} }
void CheatMenu::ApplyStyle() void CheatMenu::ApplyStyle()
@ -235,7 +238,7 @@ void CheatMenu::ApplyStyle()
void CheatMenu::ResetSize() void CheatMenu::ResetSize()
{ {
m_fMenuSize.x = screen::GetScreenWidth() / 4.0f; m_fSize.x = screen::GetScreenWidth() / 4.0f;
m_fMenuSize.y = screen::GetScreenHeight() / 1.2f; m_fSize.y = screen::GetScreenHeight() / 1.2f;
m_bSizeChangedExternal = true; m_bSizeUpdated = true;
} }

View File

@ -8,15 +8,15 @@
class CheatMenu class CheatMenu
{ {
private: private:
static inline ImVec2 m_fMenuSize = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2); static inline ImVec2 m_fSize = ImVec2(screen::GetScreenWidth() / 4, screen::GetScreenHeight() / 1.2);
static inline bool m_bShowMenu = false; // should the menu be drawn static inline bool m_bVisible = false; // should the menu be drawn
static inline bool m_bSizeChangedExternal = false; // Was menu size change requested static inline bool m_bSizeUpdated = false; // Was menu size change requested
// Applies imgui theme to the menu // Applies imgui theme to the menu
static void ApplyStyle(); static void ApplyStyle();
// Draws the window ui each frame // Draws the window ui each frame
static void DrawWindow(); static void Draw();
public: public:
CheatMenu() = delete; CheatMenu() = delete;
@ -26,7 +26,7 @@ public:
static void Init(); static void Init();
// Returns true if the menu is being shown // Returns true if the menu is being shown
static bool IsBeingDrawn(); static bool IsVisible();
// Resets the menu height & width to default // Resets the menu height & width to default
static void ResetSize(); static void ResetSize();

View File

@ -1,121 +1,109 @@
#include "pch.h" #include "pch.h"
#include "cheatmenu.h" #include "menu.h"
#include "utils/updater.h" #include "utils/updater.h"
#include "utils/rpc.h" #include "utils/rpc.h"
#include "pages/menu.h" #include "pages/menu.h"
void MenuThread(void* param) void MenuThread(void* param)
{ {
/* Events::initGameEvent +=[]
Wait for game init
// Sleep(3000);
Doing it like this doesn't prevent from attaching a debugger
*/
static bool gameStarted = false;
Events::processScriptsEvent +=[]
{ {
gameStarted = true;
};
while (!gameStarted)
{
Sleep(500);
}
/* /*
Had to put this in place since some people put the folder in root Had to put this in place since some people put the folder in root
directory and the asi in modloader. Why?? directory and the asi in modloader. Why??
*/ */
if (!std::filesystem::is_directory(PLUGIN_PATH((char*)FILE_NAME))) if (!std::filesystem::is_directory(PLUGIN_PATH((char*)FILE_NAME)))
{
std::string msg = std::format("{} folder not found. You need to put both '{}.asi' & '{}' folder in the same directory", FILE_NAME, FILE_NAME, FILE_NAME);
Log::Print<eLogLevel::Error>(msg.c_str());
MessageBox(NULL, msg.c_str(), FILE_NAME, MB_ICONERROR);
return;
}
/*
Need SilentPatch since all gta games have issues with mouse input
Implementing mouse fix is a headache anyway
*/
if (!GetModuleHandle(BY_GAME("SilentPatchSA.asi","SilentPatchVC.asi","SilentPatchIII.asi")))
{
Log::Print<eLogLevel::Error>("SilentPatch not found. Please install it from here https://gtaforums.com/topic/669045-silentpatch/");
int msgID = MessageBox(NULL, "SilentPatch not found. Do you want to install Silent Patch? (Game restart required)", FILE_NAME, MB_OKCANCEL | MB_DEFBUTTON1);
if (msgID == IDOK)
{ {
OPEN_LINK("https://gtaforums.com/topic/669045-silentpatch/"); std::string msg = std::format("{} folder not found. You need to put both '{}.asi' & '{}' folder in the same directory", FILE_NAME, FILE_NAME, FILE_NAME);
}; Log::Print<eLogLevel::Error>(msg.c_str());
return; MessageBox(NULL, msg.c_str(), FILE_NAME, MB_ICONERROR);
} return;
}
Log::Print<eLogLevel::None>("Starting " MENU_TITLE " (" BUILD_NUMBER ")\nAuthor: Grinch_\nDiscord: " /*
DISCORD_INVITE "\nMore Info: " GITHUB_LINK); Need SilentPatch since all gta games have issues with mouse input
Implementing mouse fix is a headache anyway
*/
if (!GetModuleHandle(BY_GAME("SilentPatchSA.asi","SilentPatchVC.asi","SilentPatchIII.asi")))
{
Log::Print<eLogLevel::Error>("SilentPatch not found. Please install it from here https://gtaforums.com/topic/669045-silentpatch/");
int msgID = MessageBox(NULL, "SilentPatch not found. Do you want to install Silent Patch? (Game restart required)", FILE_NAME, MB_OKCANCEL | MB_DEFBUTTON1);
// date time if (msgID == IDOK)
SYSTEMTIME st; {
GetSystemTime(&st); OPEN_LINK("https://gtaforums.com/topic/669045-silentpatch/");
Log::Print<eLogLevel::None>("Date: {}-{}-{} Time: {}:{}\n", st.wYear, st.wMonth, st.wDay, };
st.wHour, st.wMinute); return;
}
/* Log::Print<eLogLevel::None>("Starting " MENU_TITLE " (" BUILD_NUMBER ")\nAuthor: Grinch_\nDiscord: "
TODO: Find a better way DISCORD_INVITE "\nMore Info: " GITHUB_LINK);
Since you could still name it something else
*/
#ifdef GTASA
if (GetModuleHandle("SAMP.dll") || GetModuleHandle("SAMP.asi"))
{
Log::Print<eLogLevel::Error>(FILE_NAME " doesn't support SAMP");
MessageBox(NULL, "SAMP detected. Exiting " FILE_NAME, FILE_NAME, MB_ICONERROR);
return;
}
CFastman92limitAdjuster::Init();
Log::Print<eLogLevel::None>("Game detected: GTA San Andreas 1.0 US");
#elif GTAVC
if (GetModuleHandle("vcmp-proxy.dll") || GetModuleHandle("vcmp-proxy.asi"))
{
Log::Print<eLogLevel::Error>(FILE_NAME " doesn't support VCMP");
MessageBox(NULL, "VCMP detected. Exiting " FILE_NAME, FILE_NAME, MB_ICONERROR);
return;
}
Log::Print<eLogLevel::None>("Game detected: GTA Vice City 1.0 EN");
#else
Log::Print<eLogLevel::None>("Game detected: GTA III 1.0 EN");
#endif
bool modloader = GetModuleHandle("modloader.asi"); // date time
const char *path = PLUGIN_PATH((char*)""); SYSTEMTIME st;
Log::Print<eLogLevel::None>("Install location: {}", modloader && strstr(path, "modloader") ? "Modloader" : "Game directory"); GetSystemTime(&st);
Log::Print<eLogLevel::None>("Font support package: {}", FontMgr::IsSupportPackageInstalled() ? "True" : "False"); Log::Print<eLogLevel::None>("Date: {}-{}-{} Time: {}:{}\n", st.wYear, st.wMonth, st.wDay,
Log::Print<eLogLevel::None>("\nCLEO installed: {}", GetModuleHandle("cleo.asi") || GetModuleHandle("cleo_redux.asi") ? "True" : "False"); st.wHour, st.wMinute);
Log::Print<eLogLevel::None>("FLA installed: {}", GetModuleHandle("$fastman92limitAdjuster.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Mixsets installed: {}", GetModuleHandle("MixSets.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Modloader installed: {}", modloader ? "True" : "False");
Log::Print<eLogLevel::None>("OLA installed: {}", GetModuleHandle("III.VC.SA.LimitAdjuster.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("ProjectProps installed: {}", GetModuleHandle("ProjectProps.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Renderhook installed: {}", GetModuleHandle("_gtaRenderHook.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Widescreen Fix installed: {}\n", GetModuleHandle("GTASA.WidescreenFix.asi") ? "True" : "False");
CheatMenu::Init(); /*
TODO: Find a better way
Since you could still name it something else
*/
#ifdef GTASA
if (GetModuleHandle("SAMP.dll") || GetModuleHandle("SAMP.asi"))
{
Log::Print<eLogLevel::Error>(FILE_NAME " doesn't support SAMP");
MessageBox(NULL, "SAMP detected. Exiting " FILE_NAME, FILE_NAME, MB_ICONERROR);
return;
}
CFastman92limitAdjuster::Init();
Log::Print<eLogLevel::None>("Game detected: GTA San Andreas 1.0 US");
#elif GTAVC
if (GetModuleHandle("vcmp-proxy.dll") || GetModuleHandle("vcmp-proxy.asi"))
{
Log::Print<eLogLevel::Error>(FILE_NAME " doesn't support VCMP");
MessageBox(NULL, "VCMP detected. Exiting " FILE_NAME, FILE_NAME, MB_ICONERROR);
return;
}
Log::Print<eLogLevel::None>("Game detected: GTA Vice City 1.0 EN");
#else
Log::Print<eLogLevel::None>("Game detected: GTA III 1.0 EN");
#endif
// Checking for updates once a day bool modloader = GetModuleHandle("modloader.asi");
if (menuPage.m_bAutoCheckUpdate && gConfig.Get("Menu.LastUpdateChecked", 0) != st.wDay) const char *path = PLUGIN_PATH((char*)"");
{ Log::Print<eLogLevel::None>("Install location: {}", modloader && strstr(path, "modloader") ? "Modloader" : "Game directory");
Updater::CheckUpdate(); Log::Print<eLogLevel::None>("Font support package: {}", FontMgr::IsSupportPackageInstalled() ? "True" : "False");
gConfig.Set("Menu.LastUpdateChecked", st.wDay); Log::Print<eLogLevel::None>("\nCLEO installed: {}", GetModuleHandle("cleo.asi") || GetModuleHandle("cleo_redux.asi") ? "True" : "False");
} Log::Print<eLogLevel::None>("FLA installed: {}", GetModuleHandle("$fastman92limitAdjuster.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Mixsets installed: {}", GetModuleHandle("MixSets.asi") ? "True" : "False");
if (Updater::IsUpdateAvailable()) Log::Print<eLogLevel::None>("Modloader installed: {}", modloader ? "True" : "False");
{ Log::Print<eLogLevel::None>("OLA installed: {}", GetModuleHandle("III.VC.SA.LimitAdjuster.asi") ? "True" : "False");
Log::Print<eLogLevel::Info>("New update available: %s", Updater::GetUpdateVersion().c_str()); Log::Print<eLogLevel::None>("ProjectProps installed: {}", GetModuleHandle("ProjectProps.asi") ? "True" : "False");
} Log::Print<eLogLevel::None>("Renderhook installed: {}", GetModuleHandle("_gtaRenderHook.asi") ? "True" : "False");
Log::Print<eLogLevel::None>("Widescreen Fix installed: {}\n", GetModuleHandle("GTASA.WidescreenFix.asi") ? "True" : "False");
MenuMgr::Init();
// Checking for updates once a day
if (menuPage.m_bAutoCheckUpdate && gConfig.Get("Menu.LastUpdateChecked", 0) != st.wDay)
{
Updater::CheckUpdate();
gConfig.Set("Menu.LastUpdateChecked", st.wDay);
}
if (Updater::IsUpdateAvailable())
{
Log::Print<eLogLevel::Info>("New update available: %s", Updater::GetUpdateVersion().c_str());
}
};
while (true) while (true)
{ {
FontMgr::DrawPages(); FontMgr::Process();
RPC::DrawPages(); RPC::Process();
Updater::DrawPages(); Updater::Process();
Sleep(1000); Sleep(1000);
} }
} }

View File

@ -134,4 +134,17 @@ void PageHandler::DrawPages()
reinterpret_cast<IPageStatic*>(m_pCurrentPage)->Draw(); reinterpret_cast<IPageStatic*>(m_pCurrentPage)->Draw();
ImGui::EndChild(); ImGui::EndChild();
} }
}
PagePtr PageHandler::FindPagePtr(ePageID id)
{
for (void* ptr : m_PageList)
{
IPageStatic* page = reinterpret_cast<IPageStatic*>(ptr);
if (page->GetPageID() == id)
{
return reinterpret_cast<PagePtr>(page);
}
}
return nullptr;
} }

View File

@ -42,7 +42,9 @@ public:
// Add a new page // Add a new page
static void AddPage(PagePtr page, size_t index); static void AddPage(PagePtr page, size_t index);
static PagePtr FindPagePtr(ePageID id);
static void SetCurrentPage(PagePtr page); static void SetCurrentPage(PagePtr page);
}; };
/* /*
@ -84,4 +86,5 @@ public:
{ {
return m_NameKey; return m_NameKey;
} }
}; };

View File

@ -11,9 +11,12 @@ MenuPage& menuPage = MenuPage::Get();
MenuPage::MenuPage() MenuPage::MenuPage()
: IPage<MenuPage>(ePageID::Menu, "Window.MenuPage", true) : IPage<MenuPage>(ePageID::Menu, "Window.MenuPage", true)
{ {
m_bDiscordRPC = gConfig.Get("Menu.DiscordRPC", false); Events::initGameEvent += [this]()
m_bAutoCheckUpdate = gConfig.Get("Menu.AutoCheckUpdate", true); {
m_bTextOnlyMode = gConfig.Get("Menu.TextOnlyMode", false); m_bDiscordRPC = gConfig.Get("Menu.DiscordRPC", false);
m_bAutoCheckUpdate = gConfig.Get("Menu.AutoCheckUpdate", true);
m_bTextOnlyMode = gConfig.Get("Menu.TextOnlyMode", false);
};
if (m_bDiscordRPC) if (m_bDiscordRPC)
{ {

View File

@ -36,7 +36,10 @@ PlayerPage::PlayerPage()
#ifdef GTASA #ifdef GTASA
// Fix player model being broken after rebuild // Fix player model being broken after rebuild
patch::RedirectCall(0x5A834D, &PlayerModelBrokenFix); patch::RedirectCall(0x5A834D, &PlayerModelBrokenFix);
m_bAimSkinChanger = gConfig.Get("Features.AimSkinChanger", false); Events::initGameEvent += [this]()
{
m_bAimSkinChanger = gConfig.Get("Features.AimSkinChanger", false);
};
#endif #endif
Events::processScriptsEvent += [this] Events::processScriptsEvent += [this]

View File

@ -45,10 +45,13 @@ TeleportPage& teleportPage = TeleportPage::Get();
TeleportPage::TeleportPage() TeleportPage::TeleportPage()
: IPage<TeleportPage>(ePageID::Teleport, "Window.TeleportPage", true) : IPage<TeleportPage>(ePageID::Teleport, "Window.TeleportPage", true)
{ {
m_bTeleportMarker = gConfig.Get("Features.TeleportMarker", false); Events::initGameEvent += [this]()
m_bQuickTeleport = gConfig.Get("Features.QuickTeleport", false); {
m_fMapSize.x = gConfig.Get("Game.MapSizeX", 6000.0f); m_bTeleportMarker = gConfig.Get("Features.TeleportMarker", false);
m_fMapSize.y = gConfig.Get("Game.MapSizeY", 6000.0f); m_bQuickTeleport = gConfig.Get("Features.QuickTeleport", false);
m_fMapSize.x = gConfig.Get("Game.MapSizeX", 6000.0f);
m_fMapSize.y = gConfig.Get("Game.MapSizeY", 6000.0f);
};
Events::drawingEvent += [this] Events::drawingEvent += [this]
{ {

View File

@ -20,8 +20,12 @@ VehiclePage::VehiclePage()
: IPage<VehiclePage>(ePageID::Vehicle, "Window.VehiclePage", true) : IPage<VehiclePage>(ePageID::Vehicle, "Window.VehiclePage", true)
{ {
// Get config data // Get config data
m_Spawner.m_bInAir = gConfig.Get("Features.SpawnAircraftInAir", true); Events::initGameEvent += [this]()
m_Spawner.m_bAsDriver = gConfig.Get("Features.SpawnInsideVehicle", true); {
m_Spawner.m_bInAir = gConfig.Get("Features.SpawnAircraftInAir", true);
m_Spawner.m_bAsDriver = gConfig.Get("Features.SpawnInsideVehicle", true);
};
Events::processScriptsEvent += [this] Events::processScriptsEvent += [this]
{ {

View File

@ -8,7 +8,15 @@ private:
friend class IFeature; friend class IFeature;
WelcomePage() : IPage<WelcomePage>(ePageID::Welcome, "Welcome", false) WelcomePage() : IPage<WelcomePage>(ePageID::Welcome, "Welcome", false)
{ {
PageHandler::SetCurrentPage(this); Events::initGameEvent += [this]()
{
ePageID pageID = static_cast<ePageID>(gConfig.Get("Window.CurrentPage", static_cast<size_t>(ePageID::Welcome)));
PagePtr ptr = PageHandler::FindPagePtr(pageID);
if (ptr)
{
PageHandler::SetCurrentPage(ptr);
}
};
} }
WelcomePage(const WelcomePage&); WelcomePage(const WelcomePage&);

View File

@ -71,7 +71,7 @@ void FontMgr::ReloadAll()
m_bFontReloadRequired = false; m_bFontReloadRequired = false;
} }
void FontMgr::DrawPages() void FontMgr::Process()
{ {
if (curState == eStates::Idle) if (curState == eStates::Idle)
{ {

View File

@ -45,7 +45,7 @@ public:
static ImFont* Load(const char* fontID, const char* path = 0, float fontMul = 1.0f); static ImFont* Load(const char* fontID, const char* path = 0, float fontMul = 1.0f);
// Handles font downloading // Handles font downloading
static void DrawPages(); static void Process();
// Reloads all the fonts // Reloads all the fonts
static void ReloadAll(); static void ReloadAll();

View File

@ -3,7 +3,7 @@
#include "utils/util.h" #include "utils/util.h"
#include "pages/menu.h" #include "pages/menu.h"
#include "pages/vehicle.h" #include "pages/vehicle.h"
#include "cheatmenu.h" #include "menu.h"
// discord server ids // discord server ids
const char* id = BY_GAME("951199292981403669", "951448264195059712", "951457540573655080"); const char* id = BY_GAME("951199292981403669", "951448264195059712", "951457540573655080");
@ -66,7 +66,7 @@ void RPC::Init()
} }
} }
void RPC::DrawPages() void RPC::Process()
{ {
if (!(menuPage.m_bDiscordRPC && bInit)) if (!(menuPage.m_bDiscordRPC && bInit))
{ {
@ -133,7 +133,7 @@ void RPC::DrawPages()
} }
if (CheatMenu::IsBeingDrawn()) if (MenuMgr::IsBeingDrawn())
{ {
stateText = TEXT("RPC.BrowsingCheatMenu"); stateText = TEXT("RPC.BrowsingCheatMenu");
} }

View File

@ -36,6 +36,6 @@ public:
RPC(RPC&) = delete; RPC(RPC&) = delete;
static void Init(); static void Init();
static void DrawPages(); static void Process();
static void Shutdown(); static void Shutdown();
}; };

View File

@ -24,7 +24,7 @@ void Updater::CheckUpdate()
} }
} }
void Updater::DrawPages() void Updater::Process()
{ {
if (Updater::curState != States::CHECKING) if (Updater::curState != States::CHECKING)
{ {

View File

@ -32,7 +32,7 @@ public:
static bool IsUpdateAvailable(); static bool IsUpdateAvailable();
// Needs to run in it's own thread to prevent the game from freezing // Needs to run in it's own thread to prevent the game from freezing
static void DrawPages(); static void Process();
// Resets updater state to IDLE // Resets updater state to IDLE
static void ResetUpdaterState(); static void ResetUpdaterState();