ClearToColor: Avoid re-setting the same target bitmap

This commit is contained in:
Sebastian Krzyszkowiak 2020-11-07 21:38:05 +01:00
parent 4eb91e2f32
commit 86fef86257
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -137,7 +137,9 @@ SYMBOL_EXPORT void ClearToColor(struct Game* game, ALLEGRO_COLOR color) {
al_reset_clipping_rectangle();
al_clear_to_color(color);
al_set_clipping_rectangle(x, y, w, h);
al_set_target_bitmap(target);
if (al_get_target_bitmap() != target) {
al_set_target_bitmap(target);
}
}
/* linear filtering code written by SiegeLord */