blob: d614315367f9d17d1076734addee21a10a29ad88 [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 <stdio.h>
#include <SDL2/SDL.h>
int main() {
SDL_Init(SDL_INIT_VIDEO);
SDL_Window *window;
SDL_Renderer *renderer;
SDL_CreateWindowAndRenderer(256, 256, 0, &window, &renderer);
SDL_Surface *screen = SDL_CreateRGBSurface(0, 256, 256, 8, 0, 0, 0, 0);
if (SDL_MUSTLOCK(screen)) SDL_LockSurface(screen);
if (SDL_MUSTLOCK(screen)) SDL_UnlockSurface(screen);
SDL_RenderPresent(renderer);
// Don't quit - we need to reftest the canvas! SDL_Quit();
return 0;
}