From a4a941313467e149a72a51d9ffaa108a2bd700d5 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Sun, 17 Jul 2022 22:20:39 +0200 Subject: [PATCH] internal: Set target bitmap and reset clipping rectangle for PreDraw handler --- src/internal.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/internal.c b/src/internal.c index f09fefb..fc704c6 100644 --- a/src/internal.c +++ b/src/internal.c @@ -66,7 +66,10 @@ SYMBOL_INTERNAL void DrawGamestates(struct Game* game) { } if (game->_priv.params.handlers.predraw) { + al_set_target_backbuffer(game->display); + al_reset_clipping_rectangle(); game->_priv.params.handlers.predraw(game); + al_set_clipping_rectangle(game->clip_rect.x, game->clip_rect.y, game->clip_rect.w, game->clip_rect.h); } tmp = game->_priv.gamestates;