mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
(Apple) Fix mouse movements
This commit is contained in:
parent
873bcb7341
commit
a26a46d4de
@ -103,8 +103,8 @@ void apple_rarch_exited(void)
|
||||
{
|
||||
NSPoint pos;
|
||||
// Relative
|
||||
apple->mouse_x += event.deltaX;
|
||||
apple->mouse_y += event.deltaY;
|
||||
apple->mouse_x = event.deltaX;
|
||||
apple->mouse_y = event.deltaY;
|
||||
|
||||
// Absolute
|
||||
pos = [[RAGameView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||
@ -189,6 +189,14 @@ static char** waiting_argv;
|
||||
{
|
||||
NSEvent *event;
|
||||
|
||||
apple_input_data_t *apple = (apple_input_data_t*)driver.input_data;
|
||||
|
||||
if (!apple)
|
||||
return;
|
||||
|
||||
apple->mouse_x = 0;
|
||||
apple->mouse_y = 0;
|
||||
|
||||
do
|
||||
{
|
||||
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
|
||||
|
@ -260,9 +260,6 @@ static void apple_input_poll(void *data)
|
||||
|
||||
if (apple->icade_enabled)
|
||||
BIT32_SET(apple->buttons[0], apple->icade_buttons);
|
||||
|
||||
apple->mouse_x = 0;
|
||||
apple->mouse_y = 0;
|
||||
}
|
||||
|
||||
static int16_t apple_mouse_state(apple_input_data_t *apple,
|
||||
|
@ -1194,6 +1194,7 @@ static void xmb_draw_cursor(gl_t *gl, xmb_handle_t *xmb, float x, float y)
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, xmb->textures.list[XMB_TEXTURE_POINTER].id);
|
||||
|
||||
matrix_4x4_rotate_z(&mrot, 0);
|
||||
matrix_4x4_multiply(&mymat, &mrot, &gl->mvp_no_rot);
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
|
Loading…
x
Reference in New Issue
Block a user