default Tmezone is FF, not -1

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2021-04-11 13:53:21 +03:00
parent fd3b09cf13
commit 4904c3dc8e
8 changed files with 16 additions and 1182 deletions

View File

@ -839,7 +839,7 @@ rEFIt_UEFI/refit.inf {
#
<PcdsFixedAtBuild>
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x07
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0xFFFFFFFF
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80000042
}

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
Subproject commit 061ae899b5249cb67cf2a2e7b897ab6995cf2caf
Subproject commit 7bbf4133601fe901e36f2099bf45b8525bd420a1

View File

@ -4429,9 +4429,9 @@ void SETTINGS_DATA::DevicesClass::FillDevicePropertiesOld(SETTINGS_DATA& gSettin
if ( !EFI_ERROR(PropertiesDict->getKeyAndValueAtIndex(i, &key, &value)) ) { //take a <key> with DevicePath. If GetKeyValueAtIndex return success, key and value != NULL
XStringW DevicePathStr = key->keyStringValue();
// DBG("Device: %ls\n", DevicePathStr);
if (key->keyStringValue().startWithOrEqualTo("#")) {
if (key->keyStringValue().startWithOrEqualTo("#")) {
continue;
}
}
// when key in Devices/Properties is one of the strings "PrimaryGPU" / "SecondaryGPU", use device path of first / second gpu accordingly
#ifdef CLOVER_BUILD

View File

@ -626,7 +626,7 @@ public:
bool NoLegacy = false;
};
INT32 Timezone = -1;
INT32 Timezone = 0xFF;
XStringW Theme = XStringW();
//bool DarkEmbedded = 0;
XString8 EmbeddedThemeType = XString8();

View File

@ -342,7 +342,7 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
(gCPUStructure.Model == CPU_MODEL_ICELAKE) ||
(gCPUStructure.Model == CPU_MODEL_TIGERLAKE_C) ||
(gCPUStructure.Model == CPU_MODEL_TIGERLAKE_D) ||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_S) ||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_S) ||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_Y) ||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_U)) {
j = i << 8;

View File

@ -51,6 +51,7 @@ InitTheme(const CHAR8* ChosenTheme)
//initialize Daylight when we know timezone
if (gSettings.GUI.Timezone != 0xFF) { // 0xFF:default=timezone not set
INT32 NowHour = Now.Hour + gSettings.GUI.Timezone;
// DBG("now is %d, zone is %d\n", Now.Hour, gSettings.GUI.Timezone);
if (NowHour < 0 ) NowHour += 24;
if (NowHour >= 24 ) NowHour -= 24;
ThemeX.Daylight = (NowHour > 8) && (NowHour < 20);

View File

@ -2672,10 +2672,14 @@ void afterGetUserSettings(SETTINGS_DATA& gSettings)
EFI_TIME Now;
gRT->GetTime(&Now, NULL);
INT32 NowHour = Now.Hour + gSettings.GUI.Timezone;
if (NowHour < 0 ) NowHour += 24;
if (NowHour >= 24 ) NowHour -= 24;
ThemeX.Daylight = (NowHour > 8) && (NowHour < 20);
if (gSettings.GUI.Timezone != 0xFF) {
INT32 NowHour = Now.Hour + gSettings.GUI.Timezone;
if (NowHour < 0 ) NowHour += 24;
if (NowHour >= 24 ) NowHour -= 24;
ThemeX.Daylight = (NowHour > 8) && (NowHour < 20);
} else {
ThemeX.Daylight = TRUE;
}
ThemeX.DarkEmbedded = gSettings.GUI.getDarkEmbedded(ThemeX.Daylight);
@ -3160,7 +3164,7 @@ RefitMain (IN EFI_HANDLE ImageHandle,
if (gCPUStructure.TSCCalibr > 200000000ULL) { //200MHz
gCPUStructure.TSCFrequency = gCPUStructure.TSCCalibr;
}
DBG("print error level mask = %x\n", GetDebugPrintErrorLevel() );
// DBG("print error level mask = %x\n", GetDebugPrintErrorLevel() );
gCPUStructure.CPUFrequency = gCPUStructure.TSCFrequency;
gCPUStructure.FSBFrequency = DivU64x32(MultU64x32(gCPUStructure.CPUFrequency, 10),
(gCPUStructure.MaxRatio == 0) ? 1 : gCPUStructure.MaxRatio);