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);
|
memcpy(stat->label, fs->label, stat->labellen);
|
||||||
stat->fs.spaceUsed = ncl_fsGetUsage(fs);
|
stat->fs.spaceUsed = ncl_fsGetUsage(fs);
|
||||||
stat->fs.realDiskUsage = ncl_fsGetRealUsage(fs);
|
stat->fs.realDiskUsage = ncl_fsGetRealUsage(fs);
|
||||||
stat->fs.conf = &fs->conf;
|
|
||||||
stat->fs.path = fs->path;
|
stat->fs.path = fs->path;
|
||||||
stat->fs.filesOpen = 0;
|
stat->fs.filesOpen = 0;
|
||||||
for(size_t i = 0; i < NN_MAX_OPENFILES; i++) {
|
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;
|
stat->labellen = drv->labellen;
|
||||||
memcpy(stat->label, drv->label, stat->labellen);
|
memcpy(stat->label, drv->label, stat->labellen);
|
||||||
stat->drive.lastSector = drv->lastSector;
|
stat->drive.lastSector = drv->lastSector;
|
||||||
stat->drive.conf = &drv->conf;
|
|
||||||
nn_unlock(drv->ctx, drv->lock);
|
nn_unlock(drv->ctx, drv->lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3581,7 +3579,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) {
|
|||||||
size_t sectorCount = drv->conf.capacity / drv->conf.sectorSize;
|
size_t sectorCount = drv->conf.capacity / drv->conf.sectorSize;
|
||||||
if(maxWrite > 0 && sectorCount > 0) wearlevel = drv->writeCount * 100.0 / sectorCount / maxWrite;
|
if(maxWrite > 0 && sectorCount > 0) wearlevel = drv->writeCount * 100.0 / sectorCount / maxWrite;
|
||||||
stat->flash.wearlevel = wearlevel;
|
stat->flash.wearlevel = wearlevel;
|
||||||
stat->flash.conf = &drv->conf;
|
|
||||||
nn_unlock(drv->ctx, drv->lock);
|
nn_unlock(drv->ctx, drv->lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3592,7 +3589,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) {
|
|||||||
stat->usageCounter = ee->usage;
|
stat->usageCounter = ee->usage;
|
||||||
stat->labellen = ee->labellen;
|
stat->labellen = ee->labellen;
|
||||||
memcpy(stat->label, ee->label, stat->labellen);
|
memcpy(stat->label, ee->label, stat->labellen);
|
||||||
stat->eeprom.conf = &ee->conf;
|
|
||||||
stat->eeprom.codeUsed = ee->codelen;
|
stat->eeprom.codeUsed = ee->codelen;
|
||||||
stat->eeprom.dataUsed = ee->datalen;
|
stat->eeprom.dataUsed = ee->datalen;
|
||||||
nn_unlock(ee->ctx, ee->lock);
|
nn_unlock(ee->ctx, ee->lock);
|
||||||
@@ -3602,7 +3598,6 @@ void ncl_statComponent(nn_Component *component, ncl_ComponentStat *stat) {
|
|||||||
ncl_ScreenState *screen = state;
|
ncl_ScreenState *screen = state;
|
||||||
nn_lock(screen->ctx, screen->lock);
|
nn_lock(screen->ctx, screen->lock);
|
||||||
stat->usageCounter = screen->usage;
|
stat->usageCounter = screen->usage;
|
||||||
stat->screen.conf = &screen->conf;
|
|
||||||
stat->screen.depth = screen->depth;
|
stat->screen.depth = screen->depth;
|
||||||
stat->screen.flags = screen->flags;
|
stat->screen.flags = screen->flags;
|
||||||
stat->screen.keyboardCount = screen->keyboardCount;
|
stat->screen.keyboardCount = screen->keyboardCount;
|
||||||
|
|||||||
@@ -258,35 +258,29 @@ typedef struct ncl_ComponentStat {
|
|||||||
// specific properties
|
// specific properties
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
const nn_EEPROM *conf;
|
|
||||||
size_t codeUsed;
|
size_t codeUsed;
|
||||||
size_t dataUsed;
|
size_t dataUsed;
|
||||||
} eeprom;
|
} eeprom;
|
||||||
struct {
|
struct {
|
||||||
const nn_Filesystem *conf;
|
|
||||||
size_t spaceUsed;
|
size_t spaceUsed;
|
||||||
size_t realDiskUsage;
|
size_t realDiskUsage;
|
||||||
size_t filesOpen;
|
size_t filesOpen;
|
||||||
const char *path;
|
const char *path;
|
||||||
} fs;
|
} fs;
|
||||||
struct {
|
struct {
|
||||||
const nn_Drive *conf;
|
|
||||||
size_t lastSector;
|
size_t lastSector;
|
||||||
} drive;
|
} drive;
|
||||||
struct {
|
struct {
|
||||||
const nn_NandFlash *conf;
|
|
||||||
size_t currentWriteCount;
|
size_t currentWriteCount;
|
||||||
double wearlevel;
|
double wearlevel;
|
||||||
} flash;
|
} flash;
|
||||||
struct {
|
struct {
|
||||||
const nn_GPU *conf;
|
|
||||||
size_t vramFree;
|
size_t vramFree;
|
||||||
size_t bufferCount;
|
size_t bufferCount;
|
||||||
// can be NULL if there is none
|
// can be NULL if there is none
|
||||||
const char *boundScreen;
|
const char *boundScreen;
|
||||||
} gpu;
|
} gpu;
|
||||||
struct {
|
struct {
|
||||||
const nn_ScreenConfig *conf;
|
|
||||||
ncl_ScreenState *state;
|
ncl_ScreenState *state;
|
||||||
ncl_ScreenFlags flags;
|
ncl_ScreenFlags flags;
|
||||||
int viewportWidth;
|
int viewportWidth;
|
||||||
|
|||||||
Reference in New Issue
Block a user