File tree 3 files changed +21
-9
lines changed
3 files changed +21
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
#define RA_VER_MAJOR 1
4
4
#define RA_VER_MINOR 4
5
- #define RA_VER_PATCH 2
5
+ #define RA_VER_PATCH 3
6
6
7
7
#define RA_OS " Win7+"
8
8
Original file line number Diff line number Diff line change @@ -176,13 +176,16 @@ public RawAcceleration()
176
176
177
177
protected override void WndProc ( ref Message m )
178
178
{
179
- if ( m . Msg == 0x00ff ) // WM_INPUT
179
+ if ( ! ( AccelGUI is null ) )
180
180
{
181
- AccelGUI . MouseWatcher . ReadMouseMove ( m ) ;
182
- }
183
- else if ( m . Msg == 0x00fe ) // WM_INPUT_DEVICE_CHANGE
184
- {
185
- AccelGUI . UpdateInputManagers ( ) ;
181
+ if ( m . Msg == 0x00ff ) // WM_INPUT
182
+ {
183
+ AccelGUI . MouseWatcher . ReadMouseMove ( m ) ;
184
+ }
185
+ else if ( m . Msg == 0x00fe ) // WM_INPUT_DEVICE_CHANGE
186
+ {
187
+ AccelGUI . UpdateInputManagers ( ) ;
188
+ }
186
189
}
187
190
188
191
base . WndProc ( ref m ) ;
Original file line number Diff line number Diff line change @@ -19,11 +19,20 @@ static void Main()
19
19
return ;
20
20
}
21
21
22
+ AppDomain . CurrentDomain . UnhandledException += GlobalUnhandledExceptionHandler ;
23
+
22
24
Application . EnableVisualStyles ( ) ;
23
25
Application . SetCompatibleTextRenderingDefault ( false ) ;
24
26
Application . Run ( new RawAcceleration ( ) ) ;
25
-
26
- GC . KeepAlive ( mutex ) ;
27
+
28
+ GC . KeepAlive ( mutex ) ;
29
+ }
30
+
31
+ static void GlobalUnhandledExceptionHandler ( object sender , UnhandledExceptionEventArgs e )
32
+ {
33
+ var ex = ( Exception ) e . ExceptionObject ;
34
+ System . IO . File . WriteAllText ( "error.log" , ex . ToString ( ) ) ;
35
+ MessageBox . Show ( ex . Message , "Error" ) ;
27
36
}
28
37
}
29
38
}
You can’t perform that action at this time.
0 commit comments