summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 13:41:38 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2020-10-26 14:02:49 -0400
commit9b295ce13577b5e2c2c7c122d1325a02d4569320 (patch)
tree18ef16629c056d13d093d9fd10c9fd302bb8fae4
parent40e98a2e4915464b9306ab7b0f6feb173de095c5 (diff)
downloadrockbox-9b295ce13577b5e2c2c7c122d1325a02d4569320.tar.gz
rockbox-9b295ce13577b5e2c2c7c122d1325a02d4569320.tar.bz2
rockbox-9b295ce13577b5e2c2c7c122d1325a02d4569320.zip
FIX RED/YELLOW framebuffer viewport rewrite
Change-Id: Icfd3b00b646c593991f73550d8a316a80e5930a1
-rw-r--r--apps/plugins/reversi/reversi-gui.c17
-rw-r--r--firmware/drivers/lcd-bitmap-common.c2
2 files changed, 11 insertions, 8 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c
index b0869e43eb..4f36841322 100644
--- a/apps/plugins/reversi/reversi-gui.c
+++ b/apps/plugins/reversi/reversi-gui.c
@@ -196,15 +196,18 @@ static bool game_finished;
* char *title - Specify a title
* fb_data *pixmap- Currently unused, but will allow for a graphic
*/
-struct touchbutton reversi_buttons[TOUCHBUTTON_COUNT] =
- {
- { {B_MENU_X, B_MENU_Y, B_MENU_W, B_MENU_H, 0, FONT_UI, DRMODE_SOLID, 0, 0xFFFF},
+struct touchbutton reversi_buttons[TOUCHBUTTON_COUNT] =
+{
+ { {.x=B_MENU_X, .y=B_MENU_Y, .width=B_MENU_W, .height=B_MENU_H, .flags=0, .buffer= 0,
+ .font=FONT_UI, .drawmode=DRMODE_SOLID, .fg_pattern=0, .bg_pattern=0xFFFF},
false, REVERSI_BUTTON_MENU, false, "Menu", NULL },
-
- { {B_QUIT_X, B_QUIT_Y, B_QUIT_W, B_QUIT_H, 0, FONT_UI, DRMODE_SOLID, 0, 0xFFFF},
+
+ { {.x=B_QUIT_X, .y=B_QUIT_Y, .width=B_QUIT_W, .height=B_QUIT_H, .flags=0, .buffer=0,
+ .font=FONT_UI, .drawmode=DRMODE_SOLID, .fg_pattern=0, .bg_pattern=0xFFFF},
false, REVERSI_BUTTON_QUIT, false, "Quit", NULL },
-
- { {0, 0, XOFS+BOARD_WIDTH, YOFS+BOARD_HEIGHT, 0, 0, DRMODE_SOLID, 0, 0xFFFF},
+
+ { {.x=0, .y=0, .width=XOFS+BOARD_WIDTH,.height=YOFS+BOARD_HEIGHT, .flags=0, .buffer=0,
+ .font=0, .drawmode=DRMODE_SOLID, .fg_pattern=0, .bgpattern=0xFFFF},
false, REVERSI_BUTTON_MAKE_MOVE, true, NULL, NULL }
};
#endif
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 9cd3ba3774..183ab75820 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -332,7 +332,7 @@ static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
static void LCDFN(putsxyofs)(int x, int y, int ofs, const unsigned char *str)
{
unsigned short *ucs;
- struct font* pf = font_get(current_vp->font);
+ struct font* pf = font_get(LCDFN(current_vp)->font);
int vp_flags = current_vp->flags;
const unsigned char *bits;
int width;