Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Dec 5, 2023
1 parent a70abe7 commit 0f18290
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 3 additions & 6 deletions neothesia-core/src/render/text/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ pub struct TextRenderer {

impl TextRenderer {
pub fn new(gpu: &Gpu) -> Self {
let font_system = glyphon::FontSystem::new_with_fonts(
[glyphon::fontdb::Source::Binary(Arc::new(include_bytes!(
"./Roboto-Regular.ttf"
)))]
.into_iter(),
);
let font_system = glyphon::FontSystem::new_with_fonts([glyphon::fontdb::Source::Binary(
Arc::new(include_bytes!("./Roboto-Regular.ttf")),
)]);

let cache = glyphon::SwashCache::new();
let mut atlas = glyphon::TextAtlas::new(&gpu.device, &gpu.queue, gpu.texture_format);
Expand Down
7 changes: 0 additions & 7 deletions neothesia/src/output_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ pub struct OutputManager {
midi_backend: Option<MidiBackend>,

output_connection: (OutputDescriptor, Box<dyn OutputConnection>),

pub selected_output_id: Option<usize>,
pub selected_font_path: Option<PathBuf>,
}

impl Default for OutputManager {
Expand Down Expand Up @@ -86,8 +83,6 @@ impl OutputManager {
midi_backend,

output_connection: (OutputDescriptor::DummyOutput, Box::new(DummyOutput {})),
selected_output_id: None,
selected_font_path: None,
}
}

Expand Down Expand Up @@ -116,12 +111,10 @@ impl OutputManager {
if let Some(font) = font.clone() {
self.output_connection =
(desc, Box::new(synth.new_output_connection(&font)));
self.selected_font_path = Some(font);
} else if let Some(path) = crate::utils::resources::default_sf2() {
if path.exists() {
self.output_connection =
(desc, Box::new(synth.new_output_connection(&path)));
self.selected_font_path = Some(path);
}
}
}
Expand Down

0 comments on commit 0f18290

Please sign in to comment.