How to use SDL 1.2.15 without video driver?

Hello all,

I would like to use libsdl without any video driver. In my application, the surface would be accessed by iterating over surface->pixels and sent to a serial port. Setting the SDL_VIDEODRIVER environment variable to ‘dummy’ works, but is disadvised in the manual. Do you now any proper way to achieve this?

Thank you in advance!

Setting the video driver to “dummy” is the right approach for this; it makes it so SDL_VIDEO_INIT succeeds even over a text-based terminal, and drawing to the screen is a no-op, but Surfaces can still be blitted around, etc.

I don’t know why the manual says not to do that.

1 Like