record-daemon: refactor and cleanup
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user