mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-02 22:51:28 +01:00
Fix icons being light at the first display.
This commit is contained in:
parent
18038055ab
commit
bef59ccfa2
@ -792,7 +792,21 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_FUNC StyleFunc, IN OUT INT
|
|||||||
// exhaust key buffer and be sure no key is pressed to prevent option selection
|
// exhaust key buffer and be sure no key is pressed to prevent option selection
|
||||||
// when coming with a key press from timeout=0, for example
|
// when coming with a key press from timeout=0, for example
|
||||||
while (ReadAllKeyStrokes()) gBS->Stall(500 * 1000);
|
while (ReadAllKeyStrokes()) gBS->Stall(500 * 1000);
|
||||||
while (!MenuExit) {
|
while (!MenuExit)
|
||||||
|
{
|
||||||
|
// do this BEFORE calling StyleFunc.
|
||||||
|
EFI_TIME Now;
|
||||||
|
gRT->GetTime(&Now, NULL);
|
||||||
|
if (GlobalConfig.Timezone != 0xFF) {
|
||||||
|
INT32 NowHour = Now.Hour + GlobalConfig.Timezone;
|
||||||
|
if (NowHour < 0 ) NowHour += 24;
|
||||||
|
if (NowHour >= 24 ) NowHour -= 24;
|
||||||
|
Daylight = (NowHour > 8) && (NowHour < 20); //this is the screen member
|
||||||
|
} else {
|
||||||
|
Daylight = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// update the screen
|
// update the screen
|
||||||
if (ScrollState.PaintAll) {
|
if (ScrollState.PaintAll) {
|
||||||
((*this).*(StyleFunc))(MENU_FUNCTION_PAINT_ALL, NULL);
|
((*this).*(StyleFunc))(MENU_FUNCTION_PAINT_ALL, NULL);
|
||||||
@ -820,17 +834,6 @@ UINTN REFIT_MENU_SCREEN::RunGenericMenu(IN MENU_STYLE_FUNC StyleFunc, IN OUT INT
|
|||||||
DBG("GUI ready\n");
|
DBG("GUI ready\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_TIME Now;
|
|
||||||
gRT->GetTime(&Now, NULL);
|
|
||||||
if (GlobalConfig.Timezone != 0xFF) {
|
|
||||||
INT32 NowHour = Now.Hour + GlobalConfig.Timezone;
|
|
||||||
if (NowHour < 0 ) NowHour += 24;
|
|
||||||
if (NowHour >= 24 ) NowHour -= 24;
|
|
||||||
Daylight = (NowHour > 8) && (NowHour < 20); //this is the screen member
|
|
||||||
} else {
|
|
||||||
Daylight = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Status = WaitForInputEventPoll(1); //wait for 1 seconds.
|
Status = WaitForInputEventPoll(1); //wait for 1 seconds.
|
||||||
if (Status == EFI_TIMEOUT) {
|
if (Status == EFI_TIMEOUT) {
|
||||||
if (HaveTimeout) {
|
if (HaveTimeout) {
|
||||||
|
Loading…
Reference in New Issue
Block a user