updated clock for hdmi

This commit is contained in:
Shaun Inman 2023-03-04 09:15:45 -05:00
parent b17ea0470e
commit 6c8eb69128

View file

@ -232,13 +232,11 @@ int main(int argc , char* argv[]) {
POW_update(&dirty, &show_setting, NULL,NULL); POW_update(&dirty, &show_setting, NULL,NULL);
int resized = GFX_autosize(&screen, &dirty);
if (dirty) { if (dirty) {
dirty = 0;
validate(); validate();
// render if (!resized) GFX_clear(screen); // resizing clears the screen
GFX_clear(screen);
GFX_blitHardwareGroup(screen, show_setting); GFX_blitHardwareGroup(screen, show_setting);
@ -250,8 +248,11 @@ int main(int argc , char* argv[]) {
GFX_blitButtonGroup((char*[]){ "B","CANCEL", "A","SET", NULL }, screen, 1); GFX_blitButtonGroup((char*[]){ "B","CANCEL", "A","SET", NULL }, screen, 1);
// 376 or 446
int ox = (screen->w - (show_24hour?376:446)) / 2;
// datetime // datetime
int x = show_24hour ? 130 : 90; int x = ox;
int y = 185; int y = 185;
x = blitNumber(year_selected, x,y); x = blitNumber(year_selected, x,y);
@ -289,7 +290,7 @@ int main(int argc , char* argv[]) {
} }
// cursor // cursor
x = show_24hour ? 130 : 90; x = ox;
y = 222; y = 222;
if (select_cursor!=CURSOR_YEAR) { if (select_cursor!=CURSOR_YEAR) {
x += 100; // YYYY/ x += 100; // YYYY/
@ -298,6 +299,7 @@ int main(int argc , char* argv[]) {
blitBar(x,y, (select_cursor==CURSOR_YEAR ? 80 : (select_cursor==CURSOR_AMPM ? ampm_w : 40))); blitBar(x,y, (select_cursor==CURSOR_YEAR ? 80 : (select_cursor==CURSOR_AMPM ? ampm_w : 40)));
GFX_flip(screen); GFX_flip(screen);
dirty = 0;
} }
else GFX_sync(); else GFX_sync();
} }