Allow tracing getMobile result.

This commit is contained in:
jief666 2022-04-14 18:06:34 +02:00
parent 016794a82e
commit f18a5127ad
2 changed files with 17 additions and 7 deletions

View File

@ -348,6 +348,7 @@ uint64_t GetExtFwFeaturesMask(MacModel Model)
XBool GetMobile(MacModel Model) XBool GetMobile(MacModel Model)
{ {
XBool returnValue;
// Mobile: the battery tab in Energy Saver // Mobile: the battery tab in Energy Saver
switch ( Model ) switch ( Model )
{ {
@ -418,7 +419,8 @@ XBool GetMobile(MacModel Model)
case MacBookAir81: case MacBookAir81:
case MacBookAir82: case MacBookAir82:
case MacBookAir91: case MacBookAir91:
return true; returnValue = true;
break;
case MacMini11: case MacMini11:
case MacMini21: case MacMini21:
case MacMini31: case MacMini31:
@ -430,7 +432,8 @@ XBool GetMobile(MacModel Model)
case MacMini62: case MacMini62:
case MacMini71: case MacMini71:
case MacMini81: case MacMini81:
return false; returnValue = false;
break;
case iMac41: case iMac41:
case iMac42: case iMac42:
case iMac51: case iMac51:
@ -464,7 +467,8 @@ XBool GetMobile(MacModel Model)
case iMac201: case iMac201:
case iMac202: case iMac202:
case iMacPro11: case iMacPro11:
return false; returnValue = false;
break;
case MacPro11: case MacPro11:
case MacPro21: case MacPro21:
case MacPro31: case MacPro31:
@ -472,17 +476,22 @@ XBool GetMobile(MacModel Model)
case MacPro51: case MacPro51:
case MacPro61: case MacPro61:
case MacPro71: case MacPro71:
return false; returnValue = false;
break;
case Xserve11: case Xserve11:
case Xserve21: case Xserve21:
case Xserve31: case Xserve31:
return false; returnValue = false;
break;
case MaxMacModel: // currently a copy of iMac132 case MaxMacModel: // currently a copy of iMac132
return false; returnValue = false;
break;
default: // bug, unknown Apple model default: // bug, unknown Apple model
log_technical_bug("%s : cannot find model %d\n", __PRETTY_FUNCTION__, Model); log_technical_bug("%s : cannot find model %d\n", __PRETTY_FUNCTION__, Model);
return false; returnValue = false;
} }
//DBG("GetMobile returns %d\n", (bool)returnValue);
return returnValue;
} }
// PlatformFeature // PlatformFeature

View File

@ -673,6 +673,7 @@ XBool getMobileFromSmbios()
return false; return false;
} }
mHandle3 = SmbiosTable.Type3->Hdr.Handle; mHandle3 = SmbiosTable.Type3->Hdr.Handle;
//DBG("getMobileFromSmbios (SmbiosTable.Type3->Type=%d) %d\n", SmbiosTable.Type3->Type, ((SmbiosTable.Type3->Type) >= 8) && (SmbiosTable.Type3->Type != 0x0D));
return ((SmbiosTable.Type3->Type) >= 8) && (SmbiosTable.Type3->Type != 0x0D); //iMac is desktop! return ((SmbiosTable.Type3->Type) >= 8) && (SmbiosTable.Type3->Type != 0x0D); //iMac is desktop!
} }