mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
fix input click
This commit is contained in:
parent
dfbe4cc049
commit
f00f09a549
1
deps/zahnrad/zahnrad.c
vendored
1
deps/zahnrad/zahnrad.c
vendored
@ -5938,7 +5938,6 @@ zr_input_button(struct zr_context *ctx, enum zr_buttons id, int x, int y, int do
|
||||
btn = &in->mouse.buttons[id];
|
||||
btn->clicked_pos.x = (float)x;
|
||||
btn->clicked_pos.y = (float)y;
|
||||
//printf("x:%d y:%d id:%d %d\n ", x , y, id, down);
|
||||
btn->down = down;
|
||||
btn->clicked++;
|
||||
}
|
||||
|
@ -465,13 +465,9 @@ static void wimp_input_button(struct zr_context *ctx)
|
||||
{
|
||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
||||
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS);
|
||||
|
||||
if (menu_input_mouse_state(MENU_MOUSE_LEFT_BUTTON))
|
||||
{
|
||||
zr_input_button(ctx, ZR_BUTTON_LEFT, mouse_x, mouse_y, 1);
|
||||
}
|
||||
else if (menu_input_mouse_state(MENU_MOUSE_RIGHT_BUTTON))
|
||||
zr_input_button(ctx, ZR_BUTTON_RIGHT, mouse_x, mouse_y, 1);
|
||||
|
||||
zr_input_button(ctx, ZR_BUTTON_LEFT, mouse_x, mouse_y, menu_input_mouse_state(MENU_MOUSE_LEFT_BUTTON));
|
||||
zr_input_button(ctx, ZR_BUTTON_RIGHT, mouse_x, mouse_y, menu_input_mouse_state(MENU_MOUSE_RIGHT_BUTTON));
|
||||
}
|
||||
|
||||
/* zahnrad code */
|
||||
@ -1415,9 +1411,6 @@ static void wimp_frame(void *data)
|
||||
|
||||
|
||||
/* zahnrad code */
|
||||
|
||||
|
||||
//printf("mouse state: %d %d %d\n", mouse_x, mouse_y, left);
|
||||
zr_input_begin(&gui.ctx);
|
||||
wimp_input_motion(&gui.ctx);
|
||||
wimp_input_button(&gui.ctx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user