@Mequa: The Raspbian makefile has a missing library route. Complete LDFLAGS line would be:
Code: Select all
LDFLAGS=-L/opt/vc/lib -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lSDL_gfx -lSDL_ttf -lEGL -lGLESv2
Without the additional -L/opt/vc/lib, it would compile but linker couldn't find the EGL and GLES libs.
Runs fine here with dispmanx backend. I tried several examples from different categories without any problems. However, they seem to be a bit slow. Are there any calculations/waits inside the interpreter code to archieve a constant frame rate? PLEASE, take into account SDL_Flip() blocks until next vsync arrives, so these internal delays are meant to keep a constan frame rate in SDL backends with broken (non-blocking) SDL_Flip().
@Shawty: I've just updated the backend so your example works. It was my fault as I didn't initialize current video mode variables, so SDL_GetVideoInfo() didn't return the expected results.
Note that you shouldn't be including "bcm_host.h" in an SDL program, nor should you be calling bcm_host_init() or bcm_host_deinit() from it! Those are lower-level functions and the dispmanx backend takes care of that kind of stuff. So please remove those.
Also, in your code you call SDL_Quit() at the end of the main function, but you previously did atexit(exitfunc). Since exitfunc contains an SDL_Quit() call itself, you're calling it twice.
After correcting these minor errors (on both sides), that simple program runs as expected.
I couldn't find ANY program to lock up the Pi or show a black screen on exit. I should make clear that I have no X on the Pi, nor am I interested on testing of fixing anything related to that bloatware, so please run the tests withoun an X server running. Can you guys please test the new version and point me to any fullscreen programs with bad behavior?