CheatMenuSA/src/updater.h

32 lines
564 B
C
Raw Normal View History

2021-03-10 16:10:59 -05:00
#pragma once
2022-01-04 17:33:07 -05:00
/*
Update class
Checks for menu updates and provides a way to update the menu.
*/
2021-06-18 12:49:11 -04:00
class Updater
2021-03-10 16:10:59 -05:00
{
2022-01-04 17:33:07 -05:00
private:
enum class States
{
IDLE,
CHECKING,
FOUND
};
static inline States curState = States::IDLE;
static inline std::string latestVer;
2021-03-10 16:10:59 -05:00
public:
2021-06-18 12:49:11 -04:00
2022-01-04 17:33:07 -05:00
Updater() = delete;
Updater(const Updater&) = delete;
static void CheckUpdate();
static std::string GetUpdateVersion();
static bool IsUpdateAvailable();
// Needs to run in it's own thread to prevent the game from freezing
static void Process();
static void ResetUpdaterState();
2021-03-10 16:10:59 -05:00
};