flutter deal with --tray
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
		
							parent
							
								
									a06753bbdd
								
							
						
					
					
						commit
						07f23d8a54
					
				| @ -135,6 +135,9 @@ pub fn core_main() -> Option<Vec<String>> { | |||||||
|                 #[cfg(feature = "with_rc")] |                 #[cfg(feature = "with_rc")] | ||||||
|                 hbb_common::allow_err!(crate::rc::extract_resources(&args[1])); |                 hbb_common::allow_err!(crate::rc::extract_resources(&args[1])); | ||||||
|                 return None; |                 return None; | ||||||
|  |             } else if args[0] == "--tray" { | ||||||
|  |                 crate::tray::start_tray(crate::ui_interface::OPTIONS.clone()); | ||||||
|  |                 return None; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         if args[0] == "--remove" { |         if args[0] == "--remove" { | ||||||
|  | |||||||
| @ -89,11 +89,6 @@ pub fn start(args: &mut [String]) { | |||||||
|     unsafe { |     unsafe { | ||||||
|         winapi::um::shellscalingapi::SetProcessDpiAwareness(2); |         winapi::um::shellscalingapi::SetProcessDpiAwareness(2); | ||||||
|     } |     } | ||||||
|     #[cfg(windows)] |  | ||||||
|     if args.len() > 0 && args[0] == "--tray" { |  | ||||||
|         crate::tray::start_tray(crate::ui_interface::OPTIONS.clone()); |  | ||||||
|         return; |  | ||||||
|     } |  | ||||||
|     use sciter::SCRIPT_RUNTIME_FEATURES::*; |     use sciter::SCRIPT_RUNTIME_FEATURES::*; | ||||||
|     allow_err!(sciter::set_options(sciter::RuntimeOptions::ScriptFeatures( |     allow_err!(sciter::set_options(sciter::RuntimeOptions::ScriptFeatures( | ||||||
|         ALLOW_FILE_IO as u8 | ALLOW_SOCKET_IO as u8 | ALLOW_EVAL as u8 | ALLOW_SYSINFO as u8 |         ALLOW_FILE_IO as u8 | ALLOW_SOCKET_IO as u8 | ALLOW_EVAL as u8 | ALLOW_SYSINFO as u8 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user