diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/benoit/benoit.rs | 6 | ||||
-rw-r--r-- | source/benoit/benoit/app/loop.rs | 7 | ||||
-rw-r--r-- | source/benoit/benoit/configuration/load.rs | 11 |
3 files changed, 20 insertions, 4 deletions
diff --git a/source/benoit/benoit.rs b/source/benoit/benoit.rs index e4a7a8f..c0ca227 100644 --- a/source/benoit/benoit.rs +++ b/source/benoit/benoit.rs @@ -12,8 +12,8 @@ Benoit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without - even the implied warranty of MERCHANTABIL ITY or - FITNESS FOR A PARTICULAR PURPOSE. See theGNU + even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU @@ -40,7 +40,7 @@ pub struct Version<T> { pub const VERSION: Version::<u32> = Version::<u32> { major: 0x1, - minor: 0x0, + minor: 0x1, patch: 0x0, }; diff --git a/source/benoit/benoit/app/loop.rs b/source/benoit/benoit/app/loop.rs index b40b509..9d55431 100644 --- a/source/benoit/benoit/app/loop.rs +++ b/source/benoit/benoit/app/loop.rs @@ -106,7 +106,12 @@ impl App { next_zoom: &self.zoom, }; - unsafe { self.video.as_mut().unwrap_unchecked().draw(&image[..], self.canvas_width, self.scale, Some(&feedback_info)) }; + let feedback_info = match self.julia { + false => Some(&feedback_info), + true => None, + }; + + unsafe { self.video.as_mut().unwrap_unchecked().draw(&image[..], self.canvas_width, self.scale, feedback_info) }; } if self.do_dump { diff --git a/source/benoit/benoit/configuration/load.rs b/source/benoit/benoit/configuration/load.rs index 711c890..8373c22 100644 --- a/source/benoit/benoit/configuration/load.rs +++ b/source/benoit/benoit/configuration/load.rs @@ -66,6 +66,15 @@ impl Configuration { }; }; + let get_float32 = |buffer: &mut f32, table: &Table, name: &str| { + if !table.contains_key(name) { return } + + match &configuration_table[name] { + Value::Float(value) => *buffer = *value as f32, + _ => panic!("mismatched type of {name}"), + }; + }; + let get_float = |buffer: &mut Float, table: &Table, name: &str| { if !table.contains_key(name) { return } @@ -113,6 +122,8 @@ impl Configuration { get_float( &mut configuration.zoom, &configuration_table, "zoom"); get_integer(&mut configuration.max_iter_count, &configuration_table, "maximum_iteration_count"); + get_float32(&mut configuration.colour_range, &configuration_table, "colour_range"); + // We allow thread counts of zero as those signal // automatic thread count detection. if configuration.canvas_width == 0x0 { |