diff options
Diffstat (limited to 'firmware/drivers/lcd-1bit-vert.c')
-rw-r--r-- | firmware/drivers/lcd-1bit-vert.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index 3a90856819..5cacf0a740 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c | |||
@@ -60,49 +60,6 @@ static struct viewport default_vp = | |||
60 | 60 | ||
61 | static struct viewport* current_vp = &default_vp; | 61 | static struct viewport* current_vp = &default_vp; |
62 | 62 | ||
63 | /*** Viewports ***/ | ||
64 | |||
65 | void LCDFN(set_viewport)(struct viewport* vp) | ||
66 | { | ||
67 | if (vp == NULL) | ||
68 | current_vp = &default_vp; | ||
69 | else | ||
70 | current_vp = vp; | ||
71 | |||
72 | #if defined(SIMULATOR) | ||
73 | /* Force the viewport to be within bounds. If this happens it should | ||
74 | * be considered an error - the viewport will not draw as it might be | ||
75 | * expected. | ||
76 | */ | ||
77 | if((unsigned) current_vp->x > (unsigned) LCDM(WIDTH) | ||
78 | || (unsigned) current_vp->y > (unsigned) LCDM(HEIGHT) | ||
79 | || current_vp->x + current_vp->width > LCDM(WIDTH) | ||
80 | || current_vp->y + current_vp->height > LCDM(HEIGHT)) | ||
81 | { | ||
82 | #if !defined(HAVE_VIEWPORT_CLIP) | ||
83 | DEBUGF("ERROR: " | ||
84 | #else | ||
85 | DEBUGF("NOTE: " | ||
86 | #endif | ||
87 | "set_viewport out of bounds: x: %d y: %d width: %d height:%d\n", | ||
88 | current_vp->x, current_vp->y, | ||
89 | current_vp->width, current_vp->height); | ||
90 | } | ||
91 | |||
92 | #endif | ||
93 | } | ||
94 | |||
95 | void LCDFN(update_viewport)(void) | ||
96 | { | ||
97 | LCDFN(update_rect)(current_vp->x, current_vp->y, | ||
98 | current_vp->width, current_vp->height); | ||
99 | } | ||
100 | |||
101 | void LCDFN(update_viewport_rect)(int x, int y, int width, int height) | ||
102 | { | ||
103 | LCDFN(update_rect)(current_vp->x + x, current_vp->y + y, width, height); | ||
104 | } | ||
105 | |||
106 | /* LCD init */ | 63 | /* LCD init */ |
107 | void LCDFN(init)(void) | 64 | void LCDFN(init)(void) |
108 | { | 65 | { |