cpu usage reader error report added
This commit is contained in:
@@ -175,7 +175,17 @@ void MainComponent::Compose()
|
||||
}
|
||||
if (infoDisplay.cpuinfo)
|
||||
{
|
||||
ss << "CPU: " << wiCpuInfo::GetCpuPercentage() << "%" << endl;
|
||||
int cpupercentage = wiCpuInfo::GetCpuPercentage();
|
||||
ss << "CPU: ";
|
||||
if (cpupercentage >= 0)
|
||||
{
|
||||
ss << cpupercentage << "%";
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << "Query failed";
|
||||
}
|
||||
ss << endl;
|
||||
}
|
||||
wiFont(ss.str(), wiFontProps(0, 0, infoDisplay.size, WIFALIGN_LEFT, WIFALIGN_TOP)).Draw();
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ int wiCpuInfo::GetCpuPercentage()
|
||||
}
|
||||
else
|
||||
{
|
||||
usage = 0;
|
||||
usage = -1;
|
||||
}
|
||||
|
||||
return usage;
|
||||
|
||||
@@ -32,7 +32,7 @@ public:
|
||||
static void Initialize(){}
|
||||
static void Shutdown(){}
|
||||
static void Frame(){}
|
||||
static int GetCpuPercentage(){ return 0; }
|
||||
static int GetCpuPercentage(){ return -1; }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace wiVersion
|
||||
// minor features, major updates
|
||||
const int minor = 9;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 13;
|
||||
const int revision = 14;
|
||||
|
||||
|
||||
long GetVersion()
|
||||
|
||||
Reference in New Issue
Block a user