More format stuff

This commit is contained in:
Willy-JL
2023-10-19 18:26:10 +01:00
parent c5d69d7d2d
commit 72c1916a4c

View File

@@ -128,8 +128,8 @@ typedef struct {
int8_t index; int8_t index;
} State; } State;
static int32_t adv_thread(void* ctx) { static int32_t adv_thread(void* _ctx) {
State* state = ctx; State* state = _ctx;
uint8_t size; uint8_t size;
uint16_t delay; uint16_t delay;
uint8_t* packet; uint8_t* packet;
@@ -182,10 +182,14 @@ enum {
PageAboutCredits = PAGE_MAX, PageAboutCredits = PAGE_MAX,
}; };
static void draw_callback(Canvas* canvas, void* ctx) { static void draw_callback(Canvas* canvas, void* _ctx) {
State* state = *(State**)ctx; State* state = *(State**)_ctx;
const char* back = "Back"; const char* back = "Back";
const char* next = "Next"; const char* next = "Next";
if(state->index < 0) {
back = "Next";
next = "Back";
}
switch(state->index) { switch(state->index) {
case PageStart - 1: case PageStart - 1:
next = "Spam"; next = "Spam";
@@ -315,8 +319,8 @@ static void draw_callback(Canvas* canvas, void* ctx) {
} }
} }
static bool input_callback(InputEvent* input, void* ctx) { static bool input_callback(InputEvent* input, void* _ctx) {
View* view = ctx; View* view = _ctx;
State* state = *(State**)view_get_model(view); State* state = *(State**)view_get_model(view);
bool consumed = false; bool consumed = false;