record-daemon: refactor and cleanup

This commit is contained in:
2026-03-21 00:05:46 +01:00
parent 1166424c29
commit 03e36d0f1b
12 changed files with 140 additions and 139 deletions

View File

@@ -193,33 +193,6 @@ pub enum SourceType {
MonitorCapture,
}
/// Find the League of Legends game window.
///
/// Returns the window title if found, or a default if not found.
pub fn find_league_window() -> Option<String> {
#[cfg(target_os = "windows")]
{
// On Windows, we can use the Win32 API to find the window
// For now, return the expected window title
Some("League of Legends (TM) Client".to_string())
}
#[cfg(target_os = "linux")]
{
// On Linux, we would use X11 or Wayland APIs
// For now, return the expected window title
Some("League of Legends (TM) Client".to_string())
}
#[cfg(not(any(target_os = "linux", target_os = "windows")))]
None
}
/// Get the default capture configuration for League of Legends.
pub fn league_capture_config() -> GameCapture {
GameCapture::for_league_of_legends()
}
#[cfg(test)]
mod tests {
use super::*;
@@ -244,7 +217,7 @@ mod tests {
#[test]
fn test_league_capture_config() {
let capture = league_capture_config();
let capture = GameCapture::for_league_of_legends();
assert_eq!(capture.name, "League of Legends Capture");
assert_eq!(
capture.process_name,