test/testsprite2.c
changeset 2222 926294b2bb4e
parent 1985 8055185ae4ed
child 2783 e33ad7ebb7eb
equal deleted inserted replaced
2221:1d75c38e1e5c 2222:926294b2bb4e
    61     }
    61     }
    62 
    62 
    63     /* Create textures from the image */
    63     /* Create textures from the image */
    64     for (i = 0; i < state->num_windows; ++i) {
    64     for (i = 0; i < state->num_windows; ++i) {
    65         SDL_SelectRenderer(state->windows[i]);
    65         SDL_SelectRenderer(state->windows[i]);
    66         sprites[i] =
    66         sprites[i] = SDL_CreateTextureFromSurface(0, temp);
    67             SDL_CreateTextureFromSurface(0, SDL_TEXTUREACCESS_REMOTE, temp);
       
    68         if (!sprites[i]) {
    67         if (!sprites[i]) {
    69             fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError());
    68             fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError());
    70             SDL_FreeSurface(temp);
    69             SDL_FreeSurface(temp);
    71             return (-1);
    70             return (-1);
    72         }
    71         }