Skip to content

Commit 32e1251

Browse files
committed
2 parents 147e202 + 3e89c62 commit 32e1251

File tree

6 files changed

+18
-9
lines changed

6 files changed

+18
-9
lines changed

ConsolePort/Locale/enUS.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ L.DEVICE_DESC_SWITCHPRO = [[
334334
Nintendo Switch Pro controller has a similar layout to the Xbox controller, but with inverted button labels.
335335
336336
The Pro controller has four center buttons, giving it a slight edge over a standard Xbox controller.
337+
338+
The Nintendo Switch 2 Pro controller cannot use its paddles or C button natively in the game.
339+
With external software, such as Steam or reWASD, they can be mapped to keyboard keys, allowing use in game.
337340
]];
338341
L.CONTROLS_GENERAL_INFO = [[
339342
Select your preferred control scheme.

ConsolePort/Model/Gamepad/Nintendo/Switch.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ local _, db = ...; db.Gamepad:AddGamepad({
152152
PADBACK = 'Switch/Back';
153153
PADSYSTEM = 'Switch/System';
154154
PADSOCIAL = 'Switch/Share';
155+
PADPADDLE1 = 'All/RG';
156+
PADPADDLE2 = 'All/LG';
157+
PADPADDLE3 = 'Xbox/Share';
155158
};
156159
Layout = {-- format: delta (-1 or 1), drawLayer, x1, y1, ..., xN, yN
157160
--------------------
@@ -162,6 +165,8 @@ local _, db = ...; db.Gamepad:AddGamepad({
162165
--------------------
163166
PADLSTICK = {-1, 01, 0114, 0038};
164167
--------------------
168+
PADPADDLE2 = {-1, -1, 0090, -040, 0160, -194};
169+
--------------------
165170
PADDUP = {-1, 01, 0064, 0000, 0200, -020};
166171
PADDLEFT = {-1, 01, 0086, -022, 0160, -066};
167172
PADDDOWN = {-1, 01, 0066, -042, 0160, -120};
@@ -181,5 +186,8 @@ local _, db = ...; db.Gamepad:AddGamepad({
181186
--------------------
182187
PADRSTICK = {01, 01, 0054, -024, 0150, -170};
183188
PADSYSTEM = {01, 01, 0024, 0026, 0016, -050, 0130, -220};
189+
--------------------
190+
PADPADDLE1 = {01, -1, 0090, -040, 0160, -194};
191+
PADPADDLE3 = {01, 01, 0002, -050, 0040, -100, 0120, -300};
184192
};
185-
})
193+
})

ConsolePort/Utils/Const.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
-- return true or nil (nil for dynamic table insertions)
55
CPAPI.IsClassicEraVersion = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC or nil;
66
CPAPI.IsClassicVersion = WOW_PROJECT_ID == WOW_PROJECT_MISTS_CLASSIC or nil;
7+
CPAPI.IsWrathVersion = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC or nil;
78
CPAPI.IsRetailVersion = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE or nil;
89
CPAPI.IsAnniVersion = WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC or nil;
910

ConsolePort_Bar/Controller/Blizzard/Classic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- Credit: https://github.com/Nevcairiel/Bartender4/blob/master/HideBlizzard.lua
2-
if not CPAPI.IsAnniVersion then return end;
2+
if not (CPAPI.IsAnniVersion or CPAPI.IsWrathVersion) then return end;
33
local _, env = ...;
44

55
local function hideEditModeFrame(frame, clearEvents)

ConsolePort_Bar/Controller/Blizzard/ClassicEra.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- Credit: https://github.com/Nevcairiel/Bartender4/blob/master/HideBlizzardClassic.lua
2-
if not CPAPI.IsClassicEraVersion and not CPAPI.IsClassicVersion then return end;
2+
if not CPAPI.IsClassicEraVersion and not CPAPI.IsClassicVersion and not CPAPI.IsWrathVersion then return end;
33
local _, env = ...;
44

55
local function reparent(frame)

ConsolePort_Menu/Model/Buttons.lua

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ local _, env = ...;
22
---------------------------------------------------------------
33
local ICON = GenerateClosure(format, [[Interface\ICONS\%s]]);
44
local IsRetailVersion = CPAPI.IsRetailVersion or nil;
5-
local IsClassicGameVersion = CPAPI.IsClassicVersion or CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion or nil;
5+
local IsClassicGameVersion = CPAPI.IsClassicVersion or CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion or CPAPI.IsWrathVersion or nil;
66

77
local GenerateFlatClosure = GenerateFlatClosure or function(...)
88
local closure = GenerateClosure(...)
@@ -167,10 +167,7 @@ env.Buttons = {}; _ = function(data) tinsert(env.Buttons, data) end;
167167
end;
168168
} end;
169169

170-
---------------------------------------------------------------
171-
--[[ Keyring ]] if CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion and KeyRingButton then _{
172-
---------------------------------------------------------------
173-
text = KEYRING;
170+
--[[ Keyring ]] if (CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion or CPAPI.IsWrathVersion) and KeyRingButton then _{
174171
img = [[Interface\ContainerFrame\KeyRing-Bag-Icon]];
175172
ref = KeyRingButton;
176173
} end;
@@ -207,7 +204,7 @@ env.Buttons = {}; _ = function(data) tinsert(env.Buttons, data) end;
207204
img = [[Interface\LFGFRAME\UI-LFG-PORTRAIT]];
208205
ref = LFDMicroButton or LFGMicroButton;
209206
click = CPAPI.IsClassicVersion and GenerateFlatClosure(PVEFrame_ToggleFrame);
210-
OnLoad = (CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion) and function(self)
207+
OnLoad = (CPAPI.IsClassicEraVersion or CPAPI.IsAnniVersion or CPAPI.IsWrathVersion) and function(self)
211208
self.OnLoad = nil;
212209
EventUtil.ContinueOnAddOnLoaded('Blizzard_GroupFinder_VanillaStyle', function()
213210
env.db:RunSafe(function()

0 commit comments

Comments
 (0)