Updated InGameMessage render loop
This commit is contained in:
parent
5dc168d864
commit
7154c4e620
1 changed files with 3 additions and 4 deletions
|
@ -142,11 +142,8 @@ void checkInput()
|
||||||
#ifdef USE_SDL1
|
#ifdef USE_SDL1
|
||||||
SDL_Flip(screen);
|
SDL_Flip(screen);
|
||||||
#elif USE_SDL2
|
#elif USE_SDL2
|
||||||
if (cursor != nullptr)
|
|
||||||
SDL_ShowCursor(SDL_ENABLE);
|
SDL_ShowCursor(SDL_ENABLE);
|
||||||
|
|
||||||
SDL_UpdateTexture(texture, nullptr, screen->pixels, screen->pitch);
|
|
||||||
|
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
SDL_RenderCopy(renderer, texture, nullptr, nullptr);
|
SDL_RenderCopy(renderer, texture, nullptr, nullptr);
|
||||||
SDL_RenderPresent(renderer);
|
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);
|
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");
|
check_error_sdl(renderer == nullptr, "Unable to create texture from Surface");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_UpdateTexture(texture, nullptr, screen->pixels, screen->pitch);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
msg_graphics = new gcn::SDLGraphics();
|
msg_graphics = new gcn::SDLGraphics();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue