Fix C89_BUILD

This commit is contained in:
twinaphex 2016-11-04 14:29:02 +01:00
parent a70b0942d5
commit c35d723b40
4 changed files with 19 additions and 15 deletions

View File

@ -46,7 +46,7 @@ static input_keyboard_line_t *g_keyboard_line = NULL;
static void *g_keyboard_press_data = NULL;
static bool return_pressed = false;;
static bool kb_return_pressed = false;
static unsigned osk_last_codepoint = 0;
static unsigned osk_last_codepoint_len = 0;
@ -90,9 +90,9 @@ static void osk_update_last_char(const char c)
osk_update_last_codepoint(array);
}
bool input_keyboard_return_pressed()
bool input_keyboard_return_pressed(void)
{
return return_pressed;
return kb_return_pressed;
}
static void input_keyboard_line_toggle_osk(bool enable)
@ -293,7 +293,7 @@ void input_keyboard_event(bool down, unsigned code,
static bool deferred_wait_keys;
if (code == RETROK_RETURN || (!down && code == RETROK_UNKNOWN))
return_pressed = down;
kb_return_pressed = down;
if (deferred_wait_keys)
{

View File

@ -98,7 +98,7 @@ const char **input_keyboard_start_line(void *userdata,
bool input_keyboard_ctl(enum rarch_input_keyboard_ctl_state state, void *data);
bool input_keyboard_return_pressed();
bool input_keyboard_return_pressed(void);
RETRO_END_DECLS

View File

@ -263,6 +263,7 @@ static void mui_draw_tab(mui_handle_t *mui,
static void mui_render_keyboard(mui_handle_t *mui, const char *grid[], unsigned id)
{
int ptr_width, ptr_height;
unsigned i, width, height;
float dark[16]= {
0.00, 0.00, 0.00, 0.85,
@ -284,17 +285,17 @@ static void mui_render_keyboard(mui_handle_t *mui, const char *grid[], unsigned
width, height,
&dark[0]);
int ptr_width = width / 11;
int ptr_height = height / 10;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
ptr_width = ptr_height;
for (i = 0; i < 44; i++)
{
int line_y = (i / 11)*height/10.0;
int line_y = (i / 11)*height/10.0;
uintptr_t texture = mui->textures.list[MUI_TEXTURE_KEY];
if (i == id)
texture = mui->textures.list[MUI_TEXTURE_KEY_HOVER];
@ -319,6 +320,7 @@ static void mui_render_keyboard(mui_handle_t *mui, const char *grid[], unsigned
/* Returns the OSK key at a given position */
static int mui_osk_ptr_at_pos(void *data, int x, int y)
{
int ptr_width, ptr_height;
unsigned i, width, height;
mui_handle_t *mui = (mui_handle_t*)data;
@ -327,8 +329,8 @@ static int mui_osk_ptr_at_pos(void *data, int x, int y)
video_driver_get_size(&width, &height);
int ptr_width = width / 11;
int ptr_height = height / 10;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
ptr_width = ptr_height;

View File

@ -679,6 +679,7 @@ static void xmb_messagebox(void *data, const char *message)
static void xmb_render_keyboard(xmb_handle_t *xmb, const char *grid[], unsigned id)
{
int ptr_width, ptr_height;
unsigned i, width, height;
float dark[16]= {
0.00, 0.00, 0.00, 0.85,
@ -700,8 +701,8 @@ static void xmb_render_keyboard(xmb_handle_t *xmb, const char *grid[], unsigned
width, height,
&dark[0]);
int ptr_width = width / 11;
int ptr_height = height / 10;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
ptr_width = ptr_height;
@ -737,6 +738,7 @@ static void xmb_render_keyboard(xmb_handle_t *xmb, const char *grid[], unsigned
/* Returns the OSK key at a given position */
static int xmb_osk_ptr_at_pos(void *data, int x, int y)
{
int ptr_width, ptr_height;
unsigned i, width, height;
xmb_handle_t *xmb = (xmb_handle_t*)data;
@ -745,8 +747,8 @@ static int xmb_osk_ptr_at_pos(void *data, int x, int y)
video_driver_get_size(&width, &height);
int ptr_width = width / 11;
int ptr_height = height / 10;
ptr_width = width / 11;
ptr_height = height / 10;
if (ptr_width >= ptr_height)
ptr_width = ptr_height;