diff options
| author | Arslaan Pathan <[email protected]> | 2026-08-14 11:19:59 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-08-14 11:19:59 +1200 |
| commit | 781db44a6b33dd3ace81a06c79116a63bdd11b37 (patch) | |
| tree | e67be20eb6e811a29c1c9c1a33235bc7dad8a21c /jni | |
| parent | c2fc44dc13732eda5bfa4a2743173fb81d1ed1ff (diff) | |
| download | moku-assistant-781db44a6b33dd3ace81a06c79116a63bdd11b37.tar.xz moku-assistant-781db44a6b33dd3ace81a06c79116a63bdd11b37.zip | |
Remove the color switching because it's not needed
Diffstat (limited to 'jni')
| -rw-r--r-- | jni/main.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -31,7 +31,6 @@ struct engine { struct android_app *app; int window_initialized; int running; - int color; uint64_t last_update; }; @@ -47,7 +46,6 @@ struct engine *engine_new(struct android_app* app) { engine->window_initialized = 0; engine->app = app; engine->running = 0; - engine->color = COLOR_RED; engine->last_update = (uint64_t)0; return engine; @@ -80,7 +78,7 @@ static void engine_draw_frame(struct engine *engine) { for (y = 0; y < buffer.height; y++) { for (x = 0; x < buffer.width; x++) { pixel_idx = y * buffer.stride + x; - ((uint32_t*)(buffer.bits))[pixel_idx] = (uint32_t)engine->color; + ((uint32_t*)(buffer.bits))[pixel_idx] = (uint32_t)COLOR_GREEN; } } @@ -88,7 +86,7 @@ static void engine_draw_frame(struct engine *engine) { } static void engine_update(struct engine *engine) { - uint64_t now = get_timestamp_ns(); + /* uint64_t now = get_timestamp_ns(); if (now - engine->last_update > 1000000000LL) { switch (engine->color) { case COLOR_RED: @@ -104,7 +102,7 @@ static void engine_update(struct engine *engine) { LOGE("unexpected color %08x", (uint32_t)engine->color); } engine->last_update = now; - } + } */ } static void engine_real_tick(struct engine *engine) { @@ -136,7 +134,6 @@ void engine_attach_window(struct engine *engine) { return; } engine->window_initialized = 1; - engine->color = COLOR_RED; engine->last_update = get_timestamp_ns(); }; |
