diff --git a/src/computer.c b/src/computer.c index 869d19e..35c854b 100644 --- a/src/computer.c +++ b/src/computer.c @@ -1296,7 +1296,7 @@ inline void read_keyboard () { #endif #if defined(HW_RVL) || defined(HW_DOL) - if (!ordenador.vk_auto) + if (ordenador.vk_is_active) { int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y); if (SDL_JoystickGetAxis(ordenador.joystick_sdl[joy_n], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix @@ -1799,11 +1799,10 @@ inline void read_keyboard () { else //Auto VK { #ifdef HW_RVL - WPADData *wd0, *wd1; + WPADData *wd0; wd0 = WPAD_Data(0); //wiimote 0 - wd1 = WPAD_Data(1); //wiimote 1 - if (((wd0->ir.valid)||(wd1->ir.valid))&&(!ordenador.vk_is_active)) virtkey_ir_activate(); - if ((!wd0->ir.valid)&&(!wd1->ir.valid)&&(ordenador.vk_is_active)) virtkey_ir_deactivate(); + if ((wd0->ir.valid)&&(!ordenador.vk_is_active)) virtkey_ir_activate(); + if ((!wd0->ir.valid)&&(ordenador.vk_is_active)) virtkey_ir_deactivate(); #else //Win int x=0,y=0 ; SDL_GetMouseState(&x,&y); diff --git a/src/menu_sdl.c b/src/menu_sdl.c index 8074a8b..b04fed9 100644 --- a/src/menu_sdl.c +++ b/src/menu_sdl.c @@ -1167,14 +1167,11 @@ uint32_t menu_wait_key_press(int *joy_n_p) continue; #if defined(HW_RVL) || defined(HW_DOL) - if (!ordenador.vk_auto) - { int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y); if (SDL_JoystickGetAxis(ordenador.joystick_sdl[nr], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix if (SDL_JoystickGetAxis(ordenador.joystick_sdl[nr], 2) < -16384) SDL_PrivateMouseMotion(0,1,-4/RATIO,0); //C-stick Horizontal axix if (SDL_JoystickGetAxis(ordenador.joystick_sdl[nr], 3) > 16384) SDL_PrivateMouseMotion(0,1,0,4/RATIO); //C-stick vertical axix if (SDL_JoystickGetAxis(ordenador.joystick_sdl[nr], 3) < -16384) SDL_PrivateMouseMotion(0,1,0,-4/RATIO); //C-stick vertical axix - } #endif hats = SDL_JoystickNumHats (joy); for (i = 0; i < hats; i++) { @@ -1240,6 +1237,7 @@ uint32_t menu_wait_key_press(int *joy_n_p) keys = 0; //Quick scrolling + if (!joy_n_p) //We do not want fast scrolling with the vk for (nr = 0; nr < ordenador.joystick_number; nr++) { joy = ordenador.joystick_sdl[nr]; @@ -1360,9 +1358,9 @@ static int menu_select_internal(SDL_Surface *screen, else if (keys & KEY_DOWN) {select_next(p_menu, 0, 1, 1);play_click(0);} else if (keys & KEY_UP_FAST) - {select_next(p_menu, 0, -1, 1);} + {select_next(p_menu, 0, -1, 1);usleep(20000);} else if (keys & KEY_DOWN_FAST) - {select_next(p_menu, 0, 1, 1);} + {select_next(p_menu, 0, 1, 1);;usleep(20000);} else if (keys & KEY_PAGEUP) {select_next(p_menu, 0, -19, 0);play_click(0);} else if (keys & KEY_PAGEDOWN)