SDL_GetVideoSurface() equivalent function in SDL 2.0

ranu

I'm remaking a pong game, which i did in SDL 1.2, but in SDL 1.2 i had a function SDL_GetVideoSurface(), to take the surface of the screen(or i'm wrong about that?), however...

I little example in how i've used the function in my game(SDL 1.2)

void paddle::show() 
{
    SDL_BlitSurface(image, NULL, SDL_GetVideoSurface(), &box);
}

I want to know if there is a equivalent function to SDL_GetVideoSurface() in SDL 2.0, I've searched, but found nothing. And if it didn't exists, how can i blit a surface? The surface is my paddle in the pong game.

genpfault

I want to know if there is a equivalent function to SDL_GetVideoSurface() in SDL 2.0

There isn't one.

If you're feeling insane you could iterate over the entire Uint32 range and use SDL_GetWindowFromID() to search for the window(s) you created.

Keeping track of the SDL_Window*s returned by SDL_CreateWindow() like keltar suggested is the better option.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章