Cleanup: remove optional draw flipping argument

Always use take a boolean array instead of checking for null.
This commit is contained in:
Campbell Barton
2024-05-06 11:28:47 +10:00
parent 27fe72cf0d
commit e153758318

View File

@@ -604,13 +604,11 @@ static void draw_display_buffer(const PlayDisplayContext *display_ctx,
rctf preview;
BLI_rctf_init(&preview, 0.0f, 1.0f, 0.0f, 1.0f);
if (draw_flip) {
if (draw_flip[0]) {
std::swap(preview.xmin, preview.xmax);
}
if (draw_flip[1]) {
std::swap(preview.ymin, preview.ymax);
}
if (draw_flip[0]) {
std::swap(preview.xmin, preview.xmax);
}
if (draw_flip[1]) {
std::swap(preview.ymin, preview.ymax);
}
immAttr2f(texCoord, preview.xmin, preview.ymin);
@@ -788,7 +786,7 @@ static void playanim_toscreen_on_load(GhostData *ghost_data,
const int frame_step = -1;
const float zoom = 1.0f;
const float frame_indicator_factor = -1.0f;
const bool *draw_flip = nullptr;
const bool draw_flip[2] = {false, false};
playanim_toscreen_ex(ghost_data,
display_ctx,