Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Nov 26, 2024
1 parent ad06bc2 commit 0963f84
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src-tauri/src/functionality/streamer_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ pub fn start_streamer_mode_watcher(win: tauri::WebviewWindow) {
std::thread::spawn(move || loop {
std::thread::sleep(std::time::Duration::from_secs(2));

system.refresh_processes(
ProcessesToUpdate::All,
true
);
system.refresh_processes(ProcessesToUpdate::All, true);

let mut obs_running = false;

Expand All @@ -34,8 +31,16 @@ pub fn start_streamer_mode_watcher(win: tauri::WebviewWindow) {
for process in system.processes().values() {
std::thread::sleep(std::time::Duration::from_millis(5));

if process.name().to_ascii_lowercase().to_string_lossy().contains("obs64")
|| process.name().to_ascii_lowercase().to_string_lossy().contains("streamlabs")
if process
.name()
.to_ascii_lowercase()
.to_string_lossy()
.contains("obs64")
|| process
.name()
.to_ascii_lowercase()
.to_string_lossy()
.contains("streamlabs")
{
// If OBS is running, we can break out of the loop and emit the event
obs_running = true;
Expand Down

0 comments on commit 0963f84

Please sign in to comment.