From 425367695bdf2bdfd4f0a5c2ff7affc2492b90fe Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 5 Nov 2024 09:50:32 +0100 Subject: [PATCH] code style + FIXME notes Signed-off-by: Gwenhael Le Moine --- src/x49gpng/flash.c | 3 +-- src/x49gpng/ui.c | 3 +-- src/x49gpng/ui.h | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/x49gpng/flash.c b/src/x49gpng/flash.c index 536d9a6..331d49b 100644 --- a/src/x49gpng/flash.c +++ b/src/x49gpng/flash.c @@ -381,7 +381,6 @@ static int flash_load( x49gp_module_t* module, GKeyFile* key ) x49gp_flash_t* flash = module->user_data; x49gp_t* x49gp = module->x49gp; x49gp_ui_t* ui = x49gp->ui; - int calc = ui->calculator; char* filename; struct stat st; char* bootfile; @@ -444,7 +443,7 @@ static int flash_load( x49gp_module_t* module, GKeyFile* key ) memset( phys_ram_base + flash->offset, 0xff, flash->size - st.st_size ); bootfd = x49gp_module_open_rodata( module, - calc == UI_CALCULATOR_HP49GP || calc == UI_CALCULATOR_HP49GP_NEWRPL ? "firmware/boot-49g+.bin" + ui->calculator == UI_CALCULATOR_HP49GP || calc == UI_CALCULATOR_HP49GP_NEWRPL ? "firmware/boot-49g+.bin" : "firmware/boot-50g.bin", &bootfile ); diff --git a/src/x49gpng/ui.c b/src/x49gpng/ui.c index de8ec03..8dbd97c 100644 --- a/src/x49gpng/ui.c +++ b/src/x49gpng/ui.c @@ -1652,10 +1652,9 @@ static int redraw_lcd( GtkWidget* widget, GdkEventExpose* event, gpointer user_d int n; gdk_region_get_rectangles( event->region, &rects, &n ); - for ( int i = 0; i < n; i++ ) { + for ( int i = 0; i < n; i++ ) gdk_draw_drawable( gtk_widget_get_window( widget ), gtk_widget_get_style( widget )->black_gc, ui->lcd_pixmap, rects[ i ].x, rects[ i ].y, rects[ i ].x, rects[ i ].y, rects[ i ].width, rects[ i ].height ); - } g_free( rects ); diff --git a/src/x49gpng/ui.h b/src/x49gpng/ui.h index 377b7ac..82307cb 100644 --- a/src/x49gpng/ui.h +++ b/src/x49gpng/ui.h @@ -74,7 +74,7 @@ typedef struct { GtkWidget* button; GtkWidget* label; GtkWidget* box; - GdkPixmap* pixmap; + GdkPixmap* pixmap; /* FIXME */ gboolean down; gboolean hold; } x49gp_ui_button_t; @@ -86,7 +86,7 @@ struct __x49gp_ui_s__ { GtkWidget* menu_unmount; GtkWidget* menu_debug; - GdkPixmap* bg_pixmap; + GdkPixmap* bg_pixmap; /* FIXME */ GtkWidget* background; GdkColor colors[ UI_COLOR_MAX ]; @@ -99,7 +99,7 @@ struct __x49gp_ui_s__ { char* name; GtkWidget* lcd_canvas; - GdkPixmap* lcd_pixmap; + GdkPixmap* lcd_pixmap; /* FIXME */ cairo_surface_t* ann_left_surface; cairo_surface_t* ann_right_surface;