mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-03-04 09:11:27 +01:00
PrintConsole: restore previous target bitmap instead of reseting to backbuffer
This commit is contained in:
parent
9a6cbd2449
commit
f94930b5d5
1 changed files with 2 additions and 1 deletions
|
@ -382,6 +382,7 @@ SYMBOL_EXPORT void PrintConsole(struct Game *game, char* format, ...) {
|
|||
if (!game->_priv.draw) return;
|
||||
if (!game->_priv.console) return;
|
||||
if ((!game->config.debug) && (!game->_priv.showconsole)) return;
|
||||
ALLEGRO_BITMAP *target = al_get_target_bitmap();
|
||||
al_set_target_bitmap(game->_priv.console_tmp);
|
||||
al_clear_to_color(al_map_rgba(0,0,0,80));
|
||||
al_draw_bitmap_region(game->_priv.console, 0, (int)(al_get_bitmap_height(game->_priv.console)*0.2), al_get_bitmap_width(game->_priv.console), (int)(al_get_bitmap_height(game->_priv.console)*0.8), 0, 0, 0);
|
||||
|
@ -389,7 +390,7 @@ SYMBOL_EXPORT void PrintConsole(struct Game *game, char* format, ...) {
|
|||
al_set_target_bitmap(game->_priv.console);
|
||||
al_clear_to_color(al_map_rgba(0,0,0,0));
|
||||
al_draw_bitmap(game->_priv.console_tmp, 0, 0, 0);
|
||||
al_set_target_bitmap(al_get_backbuffer(game->display));
|
||||
al_set_target_bitmap(target);
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT void SetupViewport(struct Game *game, struct Viewport config) {
|
||||
|
|
Loading…
Add table
Reference in a new issue