(Apple) Fix mouse movements

This commit is contained in:
Jean-André Santoni 2015-03-10 18:44:55 +01:00
parent 873bcb7341
commit a26a46d4de
3 changed files with 11 additions and 5 deletions

View File

@ -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];
@ -188,6 +188,14 @@ static char** waiting_argv;
- (void) poll_iteration
{
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
{

View File

@ -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,

View File

@ -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);