diff options
Diffstat (limited to 'tests/sdl_swsurface.c')
-rw-r--r-- | tests/sdl_swsurface.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/sdl_swsurface.c b/tests/sdl_swsurface.c new file mode 100644 index 00000000..93141857 --- /dev/null +++ b/tests/sdl_swsurface.c @@ -0,0 +1,22 @@ +#include <assert.h> +#include <stdio.h> +#include <SDL/SDL.h> + +int main(int argc, char** argv) { + SDL_Init(SDL_INIT_VIDEO); + SDL_Surface *screen = SDL_SetVideoMode(256, 256, 32, SDL_SWSURFACE); + + // pixels should always be initialized for software surfaces, + // without having to call SDL_LockSurface / SDL_UnlockSurface + assert(screen->pixels != NULL); + + SDL_Quit(); + +#if EMSCRIPTEN + int result = 1; + REPORT_RESULT(); +#endif + + return 0; +} + |