update changelog

This commit is contained in:
souldbminersmwc committed 2026-09-10 19:09:58 -04:00
1 parent 56495e9b64
commit 52424a86e3
8 files changed
+244 -7

No files matched your search

+17 -1
View File
@@ -19,6 +19,7 @@
#include <atomic>
#include <string>
#include <vector>
#include "base_menu_gui.h"
@@ -35,6 +36,8 @@ public:
bool handleInput(u64 keysDown, u64 keysHeld, const HidTouchState &touchPos,
HidAnalogStickState leftJoy, HidAnalogStickState rightJoy) override;
void startJob(int packageIndex, bool extractOnly);
private:
enum class UpdateStage {
Idle,
@@ -43,6 +46,8 @@ private:
Done,
Failed,
Cancelled,
FetchingChangelog,
ChangelogReady,
};
struct PackageInfo {
@@ -56,11 +61,14 @@ private:
{"Horizon OC + Extensions", "https://github.com/Horizon-OC/Horizon-OC/releases/latest/download/dist_ext.zip", "sdmc:/config/horizon-oc/dist_ext.zip"},
};
static constexpr const char *kReleaseApiUrl = "https://api.github.com/repos/Horizon-OC/Horizon-OC/releases/latest";
static constexpr const char *kReleaseInfoPath = "sdmc:/config/horizon-oc/release_info.json";
bool isBusy() const {
return m_stage.load(std::memory_order_acquire) != UpdateStage::Idle;
}
void startJob(int packageIndex, bool extractOnly);
void startChangelogFetch(int packageIndex);
void requestCancel();
void reapThread();
void pollJob();
@@ -68,6 +76,9 @@ private:
static void jobEntry(void *arg);
void jobBody();
static void fetchChangelogEntry(void *arg);
void fetchChangelogBody();
std::atomic<UpdateStage> m_stage{UpdateStage::Idle};
int m_activePackage = -1;
bool m_extractOnly = false;
@@ -75,6 +86,11 @@ private:
Thread m_thread{};
std::string m_resultMessage;
std::string m_changelogTag;
std::vector<std::string> m_changelogLines;
bool m_pendingChangelogConfirm = false;
tsl::elm::ListItem *m_items[2] = {nullptr, nullptr};
UpdateStatusPanel *m_status = nullptr;