removed a useless addition that caused pointless complications
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user