Updated InGameMessage render loop

This commit is contained in:
Dimitris Panokostas 2018-01-18 16:49:48 +01:00
parent 5dc168d864
commit 7154c4e620

View file

@ -142,11 +142,8 @@ void checkInput()
#ifdef USE_SDL1
SDL_Flip(screen);
#elif USE_SDL2
if (cursor != nullptr)
SDL_ShowCursor(SDL_ENABLE);
SDL_UpdateTexture(texture, nullptr, screen->pixels, screen->pitch);
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, texture, nullptr, nullptr);
SDL_RenderPresent(renderer);
@ -194,6 +191,8 @@ void gui_init(const char* msg)
texture = SDL_CreateTexture(renderer, screen->format->format, SDL_TEXTUREACCESS_STREAMING, screen->w, screen->h);
check_error_sdl(renderer == nullptr, "Unable to create texture from Surface");
}
SDL_UpdateTexture(texture, nullptr, screen->pixels, screen->pitch);
#endif
msg_graphics = new gcn::SDLGraphics();