gr-fosphor: Update zoom function to the new {center,span} spec
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
09b31b4acf
commit
267b1f05a1
|
@ -291,13 +291,8 @@ base_sink_c_impl::settings_apply(uint32_t settings)
|
|||
this->d_render_main->channels[0].center = (float)this->d_zoom_center;
|
||||
this->d_render_main->channels[0].width = (float)this->d_zoom_width;
|
||||
|
||||
f = (float)(this->d_zoom_center - this->d_zoom_width / 2.0);
|
||||
this->d_render_zoom->freq_start =
|
||||
f > 0.0f ? (f < 1.0f ? f : 1.0f) : 0.0f;
|
||||
|
||||
f = (float)(this->d_zoom_center + this->d_zoom_width / 2.0);
|
||||
this->d_render_zoom->freq_stop =
|
||||
f > 0.0f ? (f < 1.0f ? f : 1.0f) : 0.0f;
|
||||
this->d_render_zoom->freq_center = (float)this->d_zoom_center;
|
||||
this->d_render_zoom->freq_span = (float)this->d_zoom_width;
|
||||
|
||||
fosphor_render_refresh(this->d_render_main);
|
||||
fosphor_render_refresh(this->d_render_zoom);
|
||||
|
|
Loading…
Reference in New Issue