File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1154,21 +1154,21 @@ public static void ToggleCamera()
11541154 }
11551155 }
11561156
1157- private static void SetCamera ( int status )
1157+ private static void SetCamera ( int status , bool toast = true )
11581158 {
11591159 string asusPath = GetAsusPath ( ) ;
11601160
11611161 var cameraStatus = AppConfig . Get ( "camera_status" ) ;
11621162 if ( status == 2 ) status = cameraStatus > 0 ? 0 : 1 ;
1163- var result = ProcessHelper . RunCMD ( $ "{ asusPath } \\ AsusHotkey.exe", $ "-MFCameraCommand { status } 1 0", asusPath ) ;
1164- Program . toast . RunToast ( $ "Camera " + ( ( status == 1 ) ? "On" : "Off" ) ) ;
1163+ ProcessHelper . RunCMD ( $ "{ asusPath } \\ AsusHotkey.exe", $ "-MFCameraCommand { status } 1 0", asusPath ) ;
1164+ if ( toast ) Program . toast . RunToast ( $ "Camera " + ( ( status == 1 ) ? "On" : "Off" ) ) ;
11651165 AppConfig . Set ( "camera_status" , status ) ;
11661166 }
11671167
11681168 private static void InitCamera ( )
11691169 {
11701170 var cameraStatus = AppConfig . Get ( "camera_status" ) ;
1171- if ( cameraStatus >= 0 ) SetCamera ( cameraStatus ) ;
1171+ if ( cameraStatus >= 0 ) SetCamera ( cameraStatus , false ) ;
11721172 }
11731173
11741174 private static System . Threading . Timer screenpadActionTimer ;
You can’t perform that action at this time.
0 commit comments