internal: Set target bitmap and reset clipping rectangle for PreDraw handler

This commit is contained in:
Sebastian Krzyszkowiak 2022-07-17 22:20:39 +02:00
parent 6f03021d9e
commit a4a9413134
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -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;