v2.9.7: Shop - Auswahl CIA oder 3DSX, Katalog-Leser ohne Pufferüberlauf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Nico Meister
2026-10-19 18:40:00 +02:00
co-authored by Claude Opus 5.5
parent 93316ec2c9
commit f05fd2fc16
4 changed files with 126 additions and 34 deletions
+9 -1
View File
@@ -9,9 +9,13 @@
typedef enum { APP_NEW, APP_INSTALLED, APP_UPDATE } AppStatus;
typedef struct {
char slug[72], title[64], author[44], version[28], category[16], kind[6], file[72], updated[12];
char slug[72], title[64], author[44], version[28], category[16], updated[12];
// Gewählte Variante (das lädt der Knopf): "cia" oder "3dsx", Dateiname, Größe
char kind[6], file[72];
int sheet, icon; // Symbol: Blatt und Nummer darin (-1 = keins)
u32 size, stars;
char ciaFile[72], dsxFile[72]; // beide Varianten (leer = gibt es nicht)
u32 ciaSize, dsxSize;
int shots; // Anzahl Screenshots (/shop/shot/<slug>/<n>)
bool banner; // Bannerbild vorhanden (/shop/banner/<slug>)
u32 colorBg; // Hintergrundfarbe der App (0xRRGGBB), 0 = keine
@@ -20,6 +24,7 @@ typedef struct {
// Installiert (aus SHOP_DIR/installed.txt)
bool installed;
char installedVersion[28];
char instKind[6], instFile[72]; // installierte Variante
u64 titleId; // bei CIAs, 0 sonst
} App;
@@ -34,6 +39,9 @@ App *catalog_app(int i);
int catalog_sheet_count(void);
const char *catalog_sheet_path(int n); // Symbol-Blatt auf der SD (leer, wenn nicht da)
AppStatus app_status(const App *a);
bool app_has_both(const App *a);
// Variante wählen ("cia" / "3dsx"); remember = als Standard für andere Apps merken
void app_choose(App *a, const char *kind, bool remember);
// --- Installieren / Entfernen (läuft im Hintergrund) ---
typedef enum { JOB_IDLE, JOB_RUNNING, JOB_DONE, JOB_FAILED } JobState;