fix: windows build

This commit is contained in:
Cyrix126 2024-11-19 10:55:59 +01:00
parent 2a8d013622
commit 1377ee68f4

View file

@ -3,8 +3,6 @@ use std::sync::{Arc, Mutex};
use super::App;
#[cfg(target_os = "windows")]
use crate::errors::{process_running, ErrorButtons, ErrorFerris};
#[cfg(target_os = "windows")]
use crate::helper::ProcessName;
use crate::helper::{Helper, ProcessName, ProcessState};
use crate::inits::init_text_styles;
use crate::{NODE_MIDDLE, P2POOL_MIDDLE, SECOND, XMRIG_MIDDLE, XMRIG_PROXY_MIDDLE, XVB_MIDDLE};
@ -41,7 +39,7 @@ impl eframe::App for App {
#[cfg(target_os = "windows")]
if !self.xmrig_outside_warning_acknowledge
&& process_running(ProcessName::Xmrig)
&& !xmrig_is_alive
&& !process_states.find(ProcessName::Xmrig).alive
{
self.error_state.set("An instance of xmrig is running outside of Gupaxx.\nThis is not supported and could lead to crashes on this platform.\nPlease stop your local instance and start xmrig from Gupaxx Xmrig tab.", ErrorFerris::Error, ErrorButtons::Okay);
self.xmrig_outside_warning_acknowledge = true;