to add function for in joystick_emu