poll main_menu vars (ip, charge% time) every 1s, rather than every frame.
This commit is contained in:
@@ -21,11 +21,22 @@ struct MenuBase : Widget {
|
||||
void SetTitleSubHeading(std::string sub_heading);
|
||||
void SetSubHeading(std::string sub_heading);
|
||||
|
||||
private:
|
||||
void UpdateVars();
|
||||
|
||||
private:
|
||||
std::string m_title;
|
||||
std::string m_title_sub_heading;
|
||||
std::string m_sub_heading;
|
||||
AppletType m_applet_type;
|
||||
|
||||
struct tm m_tm{};
|
||||
TimeStamp m_poll_timestamp{};
|
||||
u32 m_battery_percetange{};
|
||||
PsmChargerType m_charger_type{};
|
||||
NifmInternetConnectionType m_type{};
|
||||
NifmInternetConnectionStatus m_status{};
|
||||
u32 m_strength{};
|
||||
u32 m_ip{};
|
||||
};
|
||||
|
||||
} // namespace sphaira::ui::menu
|
||||
|
||||
@@ -114,6 +114,10 @@ struct [[nodiscard]] Vec4 {
|
||||
|
||||
struct TimeStamp {
|
||||
TimeStamp() {
|
||||
Update();
|
||||
}
|
||||
|
||||
void Update() {
|
||||
start = armGetSystemTick();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user