On macos, ifSDL_Init(SDL_INIT_VIDEO)is called on a thread other than the main thread, it'll throw an objective C exception and pop up a macos crash dialog. I'd expectSDL_Initto return false and set an error message instead. I ran into this while trying to call some SDL functions ...
Reproduction case follows. Replacing the first line withSDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);allows all buttons and axes to generate events. #include<SDL2/SDL.h>intmain(intargc,char*argv[]) {SDL_Init(SDL_INIT_JOYSTICK);SDL_JoystickOpen(0);SDL_Eventevent;while(SDL_WaitEvent(&even...
If you are installing Android SDK on Ubuntu 10.04 and using OpenJDK, you may have the message "SDL init failure, reason is: No available video device". So, let's try: apt-get install ia32-libs lib32stdc++6
crontab -e中运行android模拟器出现: SDL init failure, reason is: No available video device 解决办法: Try unsetting any environment variables along the line of SDL_*, such as SDL_VIDEODRIVER. If that doesn't work, tryexport DISPLAY=:0. http://stackoverflow.com/questions/4841908/sdl-init-fai...