fix middle mouse button input bind
half the code was using `WMouse M`, the other `WMouse C`. I think `WMouse M` makes the most sense.
This commit is contained in:
parent
9e07c85027
commit
acb14cf07d
|
@ -13,7 +13,7 @@ namespace BizHawk.Client.Common
|
|||
/// <remarks>
|
||||
/// Includes gamepad axes (<c>!axis.isNeutral</c>, with sticks as 4 "buttons" suffixed <c>"Up"</c>/<c>"Down"</c>/<c>"Left"</c>/<c>"Right"</c>).<br/>
|
||||
/// Includes mouse buttons, but not axes (cursor position and wheel rotation).
|
||||
/// Unlike <see cref="GetMouse"/>, these have the names <c>"WMouse L"</c>, <c>"WMouse R"</c>, <c>"WMouse C"</c>, <c>"WMouse 1"</c>, and <c>"WMouse 2"</c> for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.<br/>
|
||||
/// Unlike <see cref="GetMouse"/>, these have the names <c>"WMouse L"</c>, <c>"WMouse R"</c>, <c>"WMouse M"</c>, <c>"WMouse 1"</c>, and <c>"WMouse 2"</c> for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.<br/>
|
||||
/// See <see cref="DistinctKey"/> for keyboard key names, though some are overridden by <see cref="DistinctKeyNameOverrides"/> (check the source).
|
||||
/// </remarks>
|
||||
/// <seealso cref="GetPressedButtons"/>
|
||||
|
@ -49,7 +49,7 @@ namespace BizHawk.Client.Common
|
|||
/// <remarks>
|
||||
/// Includes gamepad axes (<c>!axis.isNeutral</c>, with sticks as 4 "buttons" suffixed <c>"Up"</c>/<c>"Down"</c>/<c>"Left"</c>/<c>"Right"</c>).<br/>
|
||||
/// Includes mouse buttons, but not axes (cursor position and wheel rotation).
|
||||
/// Unlike <see cref="GetMouse"/>, these have the names <c>"WMouse L"</c>, <c>"WMouse R"</c>, <c>"WMouse C"</c>, <c>"WMouse 1"</c>, and <c>"WMouse 2"</c> for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.<br/>
|
||||
/// Unlike <see cref="GetMouse"/>, these have the names <c>"WMouse L"</c>, <c>"WMouse R"</c>, <c>"WMouse M"</c>, <c>"WMouse 1"</c>, and <c>"WMouse 2"</c> for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.<br/>
|
||||
/// See <see cref="DistinctKey"/> for keyboard key names, though some are overridden by <see cref="DistinctKeyNameOverrides"/> (check the source).
|
||||
/// </remarks>
|
||||
IReadOnlyList<string> GetPressedButtons();
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.Client.Common
|
|||
public override string Name => "input";
|
||||
|
||||
[LuaMethodExample("local buttons_down = input.get();\nlocal is_b_down = buttons_down[\"B\"];\nif is_b_down and not was_b_down then console.writeline(\"B pressed\"); end\nwas_b_down = is_b_down;")]
|
||||
[LuaMethod("get", "Returns a dict-like table of key/button names (of host). Only pressed buttons will appear (with a value of {{true}}); unpressed buttons are omitted. Includes gamepad axes ({{!axis.isNeutral}}, with sticks as 4 \"buttons\" suffixed {{\"Up\"}}/{{\"Down\"}}/{{\"Left\"}}/{{\"Right\"}}). Includes mouse buttons, but not axes (cursor position and wheel rotation). Unlike {{getmouse}}, these have the names {{\"WMouse L\"}}, {{\"WMouse R\"}}, {{\"WMouse C\"}}, {{\"WMouse 1\"}}, and {{\"WMouse 2\"}} for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.")]
|
||||
[LuaMethod("get", "Returns a dict-like table of key/button names (of host). Only pressed buttons will appear (with a value of {{true}}); unpressed buttons are omitted. Includes gamepad axes ({{!axis.isNeutral}}, with sticks as 4 \"buttons\" suffixed {{\"Up\"}}/{{\"Down\"}}/{{\"Left\"}}/{{\"Right\"}}). Includes mouse buttons, but not axes (cursor position and wheel rotation). Unlike {{getmouse}}, these have the names {{\"WMouse L\"}}, {{\"WMouse R\"}}, {{\"WMouse M\"}}, {{\"WMouse 1\"}}, and {{\"WMouse 2\"}} for LMB, RMB, MMB, Mouse4, and Mouse5, respectively.")]
|
||||
public LuaTable Get()
|
||||
#pragma warning disable CS0618 // the ApiHawk equivalent of this function is warn-level deprecated; Lua can't and shouldn't make that distinction
|
||||
=> _th.DictToTable(APIs.Input.Get());
|
||||
|
|
|
@ -236,7 +236,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
var mouseBtns = Control.MouseButtons;
|
||||
HandleButton("WMouse L", (mouseBtns & MouseButtons.Left) != 0, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse C", (mouseBtns & MouseButtons.Middle) != 0, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse M", (mouseBtns & MouseButtons.Middle) != 0, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse R", (mouseBtns & MouseButtons.Right) != 0, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse 1", (mouseBtns & MouseButtons.XButton1) != 0, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse 2", (mouseBtns & MouseButtons.XButton2) != 0, ClientInputFocus.Mouse);
|
||||
|
@ -246,7 +246,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
#if false // don't do this: for now, it will interfere with the virtualpad. don't do something similar for the mouse position either
|
||||
// unpress all buttons
|
||||
HandleButton("WMouse L", false, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse C", false, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse M", false, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse R", false, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse 1", false, ClientInputFocus.Mouse);
|
||||
HandleButton("WMouse 2", false, ClientInputFocus.Mouse);
|
||||
|
|
Loading…
Reference in New Issue