From de13eeb85a08bc88996adb841072528704947726 Mon Sep 17 00:00:00 2001 From: IonutParau Date: Sat, 6 Jun 2026 03:51:10 +0200 Subject: [PATCH] removed a useless addition that caused pointless complications --- src/ncomplib.c | 5 ----- src/ncomplib.h | 6 ------ 2 files changed, 11 deletions(-) diff --git a/src/ncomplib.c b/src/ncomplib.c index e852c29..e45628e 100644 --- a/src/ncomplib.c +++ b/src/ncomplib.c @@ -3547,7 +3547,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) { memcpy(stat->label, fs->label, stat->labellen); stat->fs.spaceUsed = ncl_fsGetUsage(fs); stat->fs.realDiskUsage = ncl_fsGetRealUsage(fs); - stat->fs.conf = &fs->conf; stat->fs.path = fs->path; stat->fs.filesOpen = 0; for(size_t i = 0; i < NN_MAX_OPENFILES; i++) { @@ -3564,7 +3563,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) { stat->labellen = drv->labellen; memcpy(stat->label, drv->label, stat->labellen); stat->drive.lastSector = drv->lastSector; - stat->drive.conf = &drv->conf; nn_unlock(drv->ctx, drv->lock); return; } @@ -3581,7 +3579,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) { size_t sectorCount = drv->conf.capacity / drv->conf.sectorSize; if(maxWrite > 0 && sectorCount > 0) wearlevel = drv->writeCount * 100.0 / sectorCount / maxWrite; stat->flash.wearlevel = wearlevel; - stat->flash.conf = &drv->conf; nn_unlock(drv->ctx, drv->lock); return; } @@ -3592,7 +3589,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) { stat->usageCounter = ee->usage; stat->labellen = ee->labellen; memcpy(stat->label, ee->label, stat->labellen); - stat->eeprom.conf = &ee->conf; stat->eeprom.codeUsed = ee->codelen; stat->eeprom.dataUsed = ee->datalen; nn_unlock(ee->ctx, ee->lock); @@ -3602,7 +3598,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) { ncl_ScreenState *screen = state; nn_lock(screen->ctx, screen->lock); stat->usageCounter = screen->usage; - stat->screen.conf = &screen->conf; stat->screen.depth = screen->depth; stat->screen.flags = screen->flags; stat->screen.keyboardCount = screen->keyboardCount; diff --git a/src/ncomplib.h b/src/ncomplib.h index 2ebc2aa..3c229de 100644 --- a/src/ncomplib.h +++ b/src/ncomplib.h @@ -258,35 +258,29 @@ typedef struct ncl_ComponentStat { // specific properties union { struct { - const nn_EEPROM *conf; size_t codeUsed; size_t dataUsed; } eeprom; struct { - const nn_Filesystem *conf; size_t spaceUsed; size_t realDiskUsage; size_t filesOpen; const char *path; } fs; struct { - const nn_Drive *conf; size_t lastSector; } drive; struct { - const nn_NandFlash *conf; size_t currentWriteCount; double wearlevel; } flash; struct { - const nn_GPU *conf; size_t vramFree; size_t bufferCount; // can be NULL if there is none const char *boundScreen; } gpu; struct { - const nn_ScreenConfig *conf; ncl_ScreenState *state; ncl_ScreenFlags flags; int viewportWidth;