Improved support for OUYA controller

Fixed crash due to compiler optimisations