File tree Expand file tree Collapse file tree 2 files changed +18
-12
lines changed
Expand file tree Collapse file tree 2 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -71,18 +71,24 @@ public override void MouseMove(int x, int y)
7171
7272 public override void MouseScrollVertical ( int value )
7373 {
74- if ( value < 0 )
74+ do
7575 {
76- click ( true , Common . UP_BUTTON ) ;
77- Thread . Sleep ( - value ) ;
78- click ( false , Common . UP_BUTTON ) ;
79- }
80- else
81- {
82- click ( true , Common . DOWN_BUTTON ) ;
83- Thread . Sleep ( value ) ;
84- click ( false , Common . DOWN_BUTTON ) ;
76+ if ( value < 0 )
77+ {
78+ click ( true , Common . UP_BUTTON ) ;
79+ Thread . Sleep ( 100 ) ;
80+ click ( false , Common . UP_BUTTON ) ;
81+ value ++ ;
82+ }
83+ else
84+ {
85+ click ( true , Common . DOWN_BUTTON ) ;
86+ Thread . Sleep ( 100 ) ;
87+ click ( false , Common . DOWN_BUTTON ) ;
88+ value -- ;
89+ }
8590 }
91+ while ( value != 0 ) ;
8692 }
8793
8894
Original file line number Diff line number Diff line change @@ -171,15 +171,15 @@ public enum InputType : uint
171171
172172 public override void MouseScrollVertical ( int value )
173173 {
174- var input = new [ ]
174+ var inputs = new [ ]
175175 {
176176 new Input
177177 {
178178 Type = InputType . Mouse ,
179179 MouseInputWithUnion = new MouseInput ( value , MouseState . MouseWheelUpDown )
180180 }
181181 } ;
182- var response = SendInput ( 1 , input , Marshal . SizeOf ( input ) ) ;
182+ var response = SendInput ( 1 , inputs , Marshal . SizeOf ( inputs [ 0 ] ) ) ;
183183 Debug . Assert ( response == 0 ) ;
184184 }
185185 }
You can’t perform that action at this time.
0 commit comments