aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2020-01-31 10:27:57 +0100
committerSylvain Munaut <tnt@246tNt.com>2020-01-31 23:46:54 +0100
commit267b1f05a146b73506b30b2826fb479bc1db0c77 (patch)
tree4d2b65949cd04679ebf4de1875b815da6626f6a7 /lib
parent09b31b4acf43955f0844e2c52bc8364ec57f5c14 (diff)
gr-fosphor: Update zoom function to the new {center,span} spec
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/base_sink_c_impl.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/base_sink_c_impl.cc b/lib/base_sink_c_impl.cc
index c9cc868..e387ad4 100644
--- a/lib/base_sink_c_impl.cc
+++ b/lib/base_sink_c_impl.cc
@@ -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);