Merge branch 'main' of github.com:Bubobubobubobubo/cagire
This commit is contained in:
@@ -257,7 +257,7 @@ pub fn build_stream(
|
||||
};
|
||||
|
||||
let default_config = device.default_output_config().map_err(|e| e.to_string())?;
|
||||
let sample_rate = default_config.sample_rate().0 as f32;
|
||||
let sample_rate = default_config.sample_rate() as f32;
|
||||
|
||||
let buffer_size = if config.buffer_size > 0 {
|
||||
cpal::BufferSize::Fixed(config.buffer_size)
|
||||
|
||||
@@ -40,6 +40,12 @@ fn convert_event(event: &egui::Event) -> Option<KeyEvent> {
|
||||
}
|
||||
None
|
||||
}
|
||||
// egui intercepts Ctrl+C/V/X and converts them to these high-level events
|
||||
// instead of passing through raw Key events (see egui issue #4065).
|
||||
// Synthesize the equivalent KeyEvent so the application's input handler receives them.
|
||||
egui::Event::Copy => Some(KeyEvent::new(KeyCode::Char('c'), KeyModifiers::CONTROL)),
|
||||
egui::Event::Cut => Some(KeyEvent::new(KeyCode::Char('x'), KeyModifiers::CONTROL)),
|
||||
egui::Event::Paste(_) => Some(KeyEvent::new(KeyCode::Char('v'), KeyModifiers::CONTROL)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user