Bring up SSD2092 display/touch, USB NCM, HiDPI XLibre/DWM, and USB charging

This commit is contained in:
Luxferre committed 2026-11-22 15:49:38 +02:00
1 parent 034c1f61b1
commit 9db15e30ce
150 files changed
+2356 -446

No files matched your search

+10 -10
View File
@@ -429,7 +429,8 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
gemui_draw_header(app, cr, "\xef\x80\xb0", "Geminux Camera", badge);
int pad = 20;
gemui_rect_t vf = {pad, 80, w - 260 - pad * 3, h - 100};
int rw = 320;
gemui_rect_t vf = {pad, 92, w - rw - pad * 3, h - 112};
gemui_fill_round(cr, vf, 14, t->bg_overlay);
gemui_stroke_round(cr, vf, 14, 2.0, st->recording ? t->danger : t->border);
@@ -448,25 +449,24 @@ static void on_draw(gemui_app_t *app, cairo_t *cr, int w, int h, void *ud) {
cairo_paint(cr);
cairo_restore(cr);
} else {
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 - 40, vf.w - 48, 40},
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 - 48, vf.w - 48, 48},
"Camera Stream Unavailable", 4, true, GEMUI_ALIGN_CENTER, t->fg_bright);
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 + 8, vf.w - 48, 36},
gemui_draw_text(cr, t, (gemui_rect_t){vf.x + 24, vf.y + vf.h / 2 + 10, vf.w - 48, 42},
"Waiting for hi556 / mt6797-seninf V4L2 /dev/video* device",
-2, false, GEMUI_ALIGN_CENTER, t->fg_muted);
}
int rx = vf.x + vf.w + pad;
int rw = 260;
gemui_draw_button(app, cr, (gemui_rect_t){rx, 96, rw, 92},
gemui_draw_button(app, cr, (gemui_rect_t){rx, 96, rw, 96},
"Photo (JPEG)", HIT_SHUTTER, 0, true, false, false);
gemui_draw_button(app, cr, (gemui_rect_t){rx, 208, rw, 92},
gemui_draw_button(app, cr, (gemui_rect_t){rx, 210, rw, 96},
st->recording ? "Stop AVI" : "Record AVI", HIT_RECORD, 0, false, st->recording, false);
gemui_draw_button(app, cr, (gemui_rect_t){rx, 320, rw, 76},
gemui_draw_button(app, cr, (gemui_rect_t){rx, 324, rw, 80},
"Switch Sensor", HIT_SWITCH, 0, false, false, false);
gemui_draw_text(cr, t, (gemui_rect_t){rx, 430, rw, 36},
gemui_draw_text(cr, t, (gemui_rect_t){rx, 430, rw, 40},
st->last_file[0] ? "Last Saved:" : "", -3, true, GEMUI_ALIGN_LEFT, t->fg_muted);
gemui_draw_text(cr, t, (gemui_rect_t){rx, 466, rw, 36},
gemui_draw_text(cr, t, (gemui_rect_t){rx, 474, rw, 40},
st->last_file[0] ? st->last_file : "Space: Shutter",
-3, false, GEMUI_ALIGN_LEFT, t->accent);
}
@@ -514,7 +514,7 @@ int main(void) {
st.vfd = -1;
discover_cameras(&st);
st.app = gemui_create("geminux-camera", "Geminux Camera", 1640, 900, false);
st.app = gemui_create("geminux-camera", "Geminux Camera", 1920, 940, false);
if (!st.app) return 1;
if (st.num_devs > 0) open_camera_idx(&st, 0);