blob: 15a21865bb6f7fb37ab555627dfa5a79a2055422 [file] [log] [blame]
/*
* Copyright 2014 The Emscripten Authors. All rights reserved.
* Emscripten is available under two separate licenses, the MIT license and the
* University of Illinois/NCSA Open Source License. Both these licenses can be
* found in the LICENSE file.
*/
#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();
#ifdef __EMSCRIPTEN__
REPORT_RESULT(1);
#endif
return 0;
}