Skip to content

Commit

Permalink
moved DarwinMachine_setDeafultGPUValues call in Machine_new
Browse files Browse the repository at this point in the history
  • Loading branch information
aestriplex committed Feb 17, 2025
1 parent 17bf46f commit 8949357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions darwin/DarwinMachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static void DarwinMachine_getVMStats(DarwinMachine* this) {

static void DarwinMachine_setDeafultGPUValues(Machine* super) {
super->totalGPUUsage = (double)-1;
super->totalGPUTimeDiff = (unsigned long long int)-1;
super->totalGPUTimeDiff = (unsigned long long)-1;
}

void Machine_scan(Machine* super) {
Expand Down Expand Up @@ -117,6 +117,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) {
if(!this->GPUService) {
CRT_debug("Cannot create macOS GPUService");
}
DarwinMachine_setDeafultGPUValues(super);

return super;
}
Expand Down Expand Up @@ -176,5 +177,4 @@ void Machine_scanGPUUsage(Machine* super) {
CFRelease(properties);

super->totalGPUUsage = (double)device;
super->totalGPUTimeDiff = (unsigned long long int)-1;
}

0 comments on commit 8949357

Please sign in to comment.