Bring up SSD2092 display/touch, USB NCM, HiDPI XLibre/DWM, and USB charging
This commit is contained in:
1 parent
034c1f61b1
commit
9db15e30ce
150 files changed
+2356
-446
No files matched your search
@@ -98,45 +98,45 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
|
||||
int pad = 24;
|
||||
int cw = (w - pad * 2);
|
||||
|
||||
st->bri_rect = (gemui_rect_t){pad, 88, cw, 92};
|
||||
st->bri_rect = (gemui_rect_t){pad, 92, cw, 104};
|
||||
char btxt[32];
|
||||
double bnorm = st->bl_max > 0 ? (double)st->bl_cur / st->bl_max : 0.5;
|
||||
snprintf(btxt, sizeof(btxt), "%d%%", (int)(bnorm * 100.0 + 0.5));
|
||||
gemui_draw_slider(app, cr, st->bri_rect, "Display Backlight", bnorm, btxt, HIT_BRI, 0, false);
|
||||
|
||||
st->vol_rect = (gemui_rect_t){pad, 196, cw, 92};
|
||||
st->vol_rect = (gemui_rect_t){pad, 210, cw, 104};
|
||||
char vtxt[32];
|
||||
snprintf(vtxt, sizeof(vtxt), "%d%%", st->vol_pct);
|
||||
gemui_draw_slider(app, cr, st->vol_rect, "Master Audio Volume", st->vol_pct / 100.0, vtxt, HIT_VOL, 0, false);
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 308, cw, 34},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 330, cw, 40},
|
||||
"MT6797X Power Profile (A72 Big Cluster + Schedutil)",
|
||||
-1, true, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
int pw = (cw - 24) / 3;
|
||||
static const char *profs[3] = {"Eco (A53 Only)", "Balanced", "Performance (10-Core)"};
|
||||
for (int i = 0; i < 3; i++) {
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (pw + 12), 348, pw, 72},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (pw + 12), 376, pw, 78},
|
||||
profs[i], HIT_PROF, i, false, st->profile == i, false);
|
||||
}
|
||||
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 444, cw, 34},
|
||||
gemui_draw_text(cr, t, (gemui_rect_t){pad, 472, cw, 40},
|
||||
"AW9120 LED Strip Indicator", -1, true, GEMUI_ALIGN_LEFT, t->fg_bright);
|
||||
int lw = (cw - 36) / 4;
|
||||
static const char *leds[4] = {"Off", "Cyan Pulse", "Green OK", "Amber Warn"};
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (lw + 12), 484, lw, 68},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + i * (lw + 12), 518, lw, 76},
|
||||
leds[i], HIT_LED, i, false, false, false);
|
||||
}
|
||||
|
||||
int ay = h - 104;
|
||||
int ay = h - 106;
|
||||
int aw = (cw - 36) / 4;
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad, ay, aw, 82},
|
||||
"Lock Screen", HIT_LOCK, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + aw + 12, ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + aw + 12, ay, aw, 82},
|
||||
"Suspend Now", HIT_SUSPEND, 0, true, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 2 * (aw + 12), ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 2 * (aw + 12), ay, aw, 82},
|
||||
"Reboot", HIT_REBOOT, 0, false, false, false);
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 3 * (aw + 12), ay, aw, 78},
|
||||
gemui_draw_button(app, cr, (gemui_rect_t){pad + 3 * (aw + 12), ay, aw, 82},
|
||||
"Power Off", HIT_POWER, 0, false, false, false);
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ int main(void) {
|
||||
st.profile = 1;
|
||||
refresh_hw(&st);
|
||||
|
||||
st.app = gemui_create("geminux-control", "Geminux Control Center", 1480, 720, false);
|
||||
st.app = gemui_create("geminux-control", "Geminux Control Center", 1880, 900, false);
|
||||
if (!st.app) return 1;
|
||||
|
||||
gemui_handlers_t h = { .on_draw = on_draw, .on_key = on_key, .on_ptr = on_ptr };
|
||||
|
||||
Reference in new issue
Block a user