From 7d0ebd1b51a0b0ed04cf3cb0669880ee5b11f352 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 30 Oct 2016 14:27:24 +0100 Subject: [PATCH] Some C89_BUILD fixes --- menu/drivers/materialui.c | 8 +++----- menu/drivers/xmb.c | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index 1e06d57021..ad695f37e9 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -328,12 +328,10 @@ static int mui_osk_ptr_at_pos(void *data, int x, int y) for (i = 0; i <= 40; i++) { - int line_y; int ptr_width = height / 12; - line_y = (i / 10)*height/10.0; - - int ptr_x = width/11.0 + (i % 10) * width/11.0 - ptr_width/2; - int ptr_y = height*2.5/4.0 + line_y - ptr_width/2 - mui->font->size / 4; + int line_y = (i / 10)*height/10.0; + int ptr_x = width/11.0 + (i % 10) * width/11.0 - ptr_width/2; + int ptr_y = height*2.5/4.0 + line_y - ptr_width/2 - mui->font->size / 4; if (x > ptr_x && x < ptr_x + ptr_width && y > ptr_y && y < ptr_y + ptr_width) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index a7ca53905a..03e7c5f8f5 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -743,12 +743,10 @@ static int xmb_osk_ptr_at_pos(void *data, int x, int y) for (i = 0; i <= 40; i++) { - int line_y; int ptr_width = height / 12; - line_y = (i / 10)*height/10.0; - - int ptr_x = width/11.0 + (i % 10) * width/11.0 - ptr_width/2; - int ptr_y = height*2.5/4.0 + line_y - ptr_width/2 - xmb->font->size / 4; + int line_y = (i / 10)*height/10.0; + int ptr_x = width/11.0 + (i % 10) * width/11.0 - ptr_width/2; + int ptr_y = height*2.5/4.0 + line_y - ptr_width/2 - xmb->font->size / 4; if (x > ptr_x && x < ptr_x + ptr_width && y > ptr_y && y < ptr_y + ptr_width)