File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
src/BizHawk.Client.EmuHawk/config/ControllerConfig Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,25 @@ private void Timer1_Tick(object sender, EventArgs e)
3737 {
3838 timer1 . Stop ( ) ;
3939 _listening = false ;
40- _bind . Value = bindValue ;
41- textBox1 . Text = Bind . Value ;
4240 buttonBind . Text = "Bind!" ;
4341 Input . Instance . StopListeningForAxisEvents ( ) ;
42+ // rebinding the same mouse axis toggles between relative and absolute
43+ const string AXIS_MX = "WMouse X" ;
44+ const string AXIS_MRX = "RMouse X" ;
45+ const string AXIS_MY = "WMouse Y" ;
46+ const string AXIS_MRY = "RMouse Y" ;
47+ var oldBind = _bind . Value ;
48+ if ( bindValue is AXIS_MX )
49+ {
50+ if ( oldBind is AXIS_MX ) bindValue = AXIS_MRX ;
51+ else if ( oldBind is AXIS_MRX ) bindValue = AXIS_MX ;
52+ }
53+ else if ( bindValue is AXIS_MY )
54+ {
55+ if ( oldBind is AXIS_MY ) bindValue = AXIS_MRY ;
56+ else if ( oldBind is AXIS_MRY ) bindValue = AXIS_MY ;
57+ }
58+ textBox1 . Text = _bind . Value = bindValue ;
4459 }
4560 }
4661
You can’t perform that action at this time.
0 commit comments