diff options
| -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(); }; |
