summaryrefslogtreecommitdiffstats
path: root/minuitwrp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:39 +0200
commit58f2132bc3954fc704787d477500a209eedb8e29 (patch)
treeeb0f79aacd68724b0c0c091018384ef924380f47 /minuitwrp
parentRemove remaining pieces of supersu (diff)
parentSnap for 4745538 from 723056a83f8c8b15af02d9c302862dbb2304ea8c to pi-release (diff)
downloadandroid_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.gz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.bz2
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.lz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.xz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.zst
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.zip
Diffstat (limited to 'minuitwrp')
-rw-r--r--minuitwrp/events.cpp10
-rw-r--r--minuitwrp/graphics.cpp15
-rw-r--r--minuitwrp/truetype.cpp9
3 files changed, 10 insertions, 24 deletions
diff --git a/minuitwrp/events.cpp b/minuitwrp/events.cpp
index 04545b64f..94b800ea6 100644
--- a/minuitwrp/events.cpp
+++ b/minuitwrp/events.cpp
@@ -101,7 +101,7 @@ static struct pollfd ev_fds[MAX_DEVICES];
static struct ev evs[MAX_DEVICES];
static unsigned ev_count = 0;
static struct timeval lastInputStat;
-static unsigned long lastInputMTime;
+static time_t lastInputMTime;
static int has_mouse = 0;
static inline int ABS(int x) {
@@ -360,7 +360,7 @@ void ev_exit(void)
ev_count = 0;
}
-static int vk_inside_display(__s32 value, struct input_absinfo *info, int screen_size)
+/*static int vk_inside_display(__s32 value, struct input_absinfo *info, int screen_size)
{
int screen_pos;
@@ -369,7 +369,7 @@ static int vk_inside_display(__s32 value, struct input_absinfo *info, int screen
screen_pos = (value - info->minimum) * (screen_size - 1) / (info->maximum - info->minimum);
return (screen_pos >= 0 && screen_pos < screen_size);
-}
+}*/
static int vk_tp_to_screen(struct position *p, int *x, int *y)
{
@@ -782,7 +782,7 @@ int ev_get(struct input_event *ev, int timeout_ms)
return -2;
}
-int ev_wait(int timeout)
+int ev_wait(int timeout __unused)
{
return -1;
}
@@ -792,7 +792,7 @@ void ev_dispatch(void)
return;
}
-int ev_get_input(int fd, short revents, struct input_event *ev)
+int ev_get_input(int fd __unused, short revents __unused, struct input_event *ev __unused)
{
return -1;
}
diff --git a/minuitwrp/graphics.cpp b/minuitwrp/graphics.cpp
index 3dc88d9db..81e77a630 100644
--- a/minuitwrp/graphics.cpp
+++ b/minuitwrp/graphics.cpp
@@ -42,7 +42,6 @@ struct GRFont {
int cheight;
};
-static GRFont* gr_font = NULL;
static minui_backend* gr_backend = NULL;
static int overscan_percent = OVERSCAN_PERCENT;
@@ -52,11 +51,6 @@ static int overscan_offset_y = 0;
static unsigned char gr_current_r = 255;
static unsigned char gr_current_g = 255;
static unsigned char gr_current_b = 255;
-static unsigned char gr_current_a = 255;
-static unsigned char rgb_555[2];
-static unsigned char gr_current_r5 = 31;
-static unsigned char gr_current_g5 = 63;
-static unsigned char gr_current_b5 = 31;
GRSurface* gr_draw = NULL;
@@ -64,19 +58,12 @@ static GGLContext *gr_context = 0;
GGLSurface gr_mem_surface;
static int gr_is_curr_clr_opaque = 0;
-static bool outside(int x, int y)
-{
- return x < 0 || x >= gr_draw->width || y < 0 || y >= gr_draw->height;
-}
-
int gr_textEx_scaleW(int x, int y, const char *s, void* pFont, int max_width, int placement, int scale)
{
GGLContext *gl = gr_context;
void* vfont = pFont;
GRFont *font = (GRFont*) pFont;
- unsigned off;
- unsigned cwidth;
- int y_scale = 0, measured_width, measured_height, ret, new_height;
+ int y_scale = 0, measured_width, measured_height, new_height;
if (!s || strlen(s) == 0 || !font)
return 0;
diff --git a/minuitwrp/truetype.cpp b/minuitwrp/truetype.cpp
index 18635a886..3e5f70719 100644
--- a/minuitwrp/truetype.cpp
+++ b/minuitwrp/truetype.cpp
@@ -461,7 +461,7 @@ static int gr_ttf_render_text(TrueTypeFont *font, GGLSurface *surface, const cha
int utf_bytes = 0;
unsigned int unicode = 0;
int i, x, diff, char_idx, prev_idx = 0;
- int height, base;
+ int height;
FT_Vector delta;
uint8_t *data = NULL;
const char *text_itr = text;
@@ -547,7 +547,6 @@ static int gr_ttf_render_text(TrueTypeFont *font, GGLSurface *surface, const cha
static StringCacheEntry *gr_ttf_string_cache_peek(TrueTypeFont *font, const char *text, int max_width)
{
- StringCacheEntry *res;
StringCacheKey k = {
.text = (char*)text,
.max_width = max_width
@@ -785,8 +784,8 @@ static bool gr_ttf_dump_stats_font(void *key, void *value, void *context)
" refcount: %d\n"
" max_height: %d\n"
" base: %d\n"
- " glyph_cache: %d entries\n"
- " string_cache: %d entries (%.2f kB)\n",
+ " glyph_cache: %zu entries\n"
+ " string_cache: %zu entries (%.2f kB)\n",
k->path, k->size, k->dpi,
f->refcount, f->max_height, f->base,
hashmapSize(f->glyph_cache),
@@ -808,7 +807,7 @@ void gr_ttf_dump_stats(void)
else
{
int total_string_cache_size = 0;
- printf("%d fonts loaded.\n", hashmapSize(font_data.fonts));
+ printf("%zu fonts loaded.\n", hashmapSize(font_data.fonts));
hashmapForEach(font_data.fonts, gr_ttf_dump_stats_font, &total_string_cache_size);
printf(" Total string cache size: %.2f kB\n", ((double)total_string_cache_size)/1024);
}