Skip to content

Commit

Permalink
Halos: fixed incorrect drawing origin when at non-default zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Jul 31, 2017
1 parent e285ea1 commit ee69744
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/halo.cpp
Expand Up @@ -187,8 +187,10 @@ bool halo_impl::effect::render()

texture::info t_info = texture_.get_info();

const int xpos = x_ + screenx - t_info.w / 2;
const int ypos = y_ + screeny - t_info.h / 2;
const double zoom_factor = disp->get_zoom_factor();

const int xpos = x_ + screenx - (t_info.w / 2) * zoom_factor;
const int ypos = y_ + screeny - (t_info.h / 2) * zoom_factor;

// TODO: decide if I need this
// SDL_Rect clip_rect = disp->map_outside_area();
Expand Down

0 comments on commit ee69744

Please sign in to comment.