Skip to content

Commit a157f78

Browse files
committed
Rearrange keyboard mappings. Misc.
1 parent 774b243 commit a157f78

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

SerialPrograms/Source/NintendoSwitch/Controllers/NintendoSwitch_ControllerSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ void ControllerSettingsRow::value_changed(void* object){
253253

254254
ControllerSettingsTable::ControllerSettingsTable()
255255
: EditableTableOption_t<ControllerSettingsRow>(
256-
"<b>Controller Settings:</b>",
256+
"<b>Wireless Controller Settings:</b><br>Changes take effect after resetting the device.",
257257
LockMode::UNLOCK_WHILE_RUNNING,
258258
true
259259
)

SerialPrograms/Source/NintendoSwitch/Controllers/NintendoSwitch_KeyboardMapping.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ std::vector<std::unique_ptr<EditableTableRow>> ProControllerKeyboardMappingTable
168168
ret.emplace_back(make_mapping("Dpad Up+Left", Qt::Key::Key_7, ProControllerDeltas{.dpad_x = -1, .dpad_y = -1}));
169169

170170
ret.emplace_back(make_mapping("Left-Stick Up", Qt::Key::Key_W, ProControllerDeltas{.left_x = 0, .left_y = -1}));
171-
ret.emplace_back(make_mapping("Left-Stick Right", Qt::Key::Key_D, ProControllerDeltas{.left_x = +1, .left_y = 0}));
172-
ret.emplace_back(make_mapping("Left-Stick Down", Qt::Key::Key_S, ProControllerDeltas{.left_x = 0, .left_y = +1}));
173171
ret.emplace_back(make_mapping("Left-Stick Left", Qt::Key::Key_A, ProControllerDeltas{.left_x = -1, .left_y = 0}));
172+
ret.emplace_back(make_mapping("Left-Stick Down", Qt::Key::Key_S, ProControllerDeltas{.left_x = 0, .left_y = +1}));
173+
ret.emplace_back(make_mapping("Left-Stick Right", Qt::Key::Key_D, ProControllerDeltas{.left_x = +1, .left_y = 0}));
174174
ret.emplace_back(make_mapping("Right-Stick Up", Qt::Key::Key_Up, ProControllerDeltas{.right_x = 0, .right_y = -1}));
175175
ret.emplace_back(make_mapping("Right-Stick Right", Qt::Key::Key_Right, ProControllerDeltas{.right_x = +1, .right_y = 0}));
176176
ret.emplace_back(make_mapping("Right-Stick Down", Qt::Key::Key_Down, ProControllerDeltas{.right_x = 0, .right_y = +1}));
@@ -328,9 +328,9 @@ std::vector<std::unique_ptr<EditableTableRow>> JoyconKeyboardMappingTable::make_
328328

329329
if (left){
330330
ret.emplace_back(make_mapping("Vertical: JS Up", Qt::Key::Key_W, JoyconDeltas{.joystick_x = 0, .joystick_y = -1}));
331-
ret.emplace_back(make_mapping("Vertical: JS Right", Qt::Key::Key_D, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
332-
ret.emplace_back(make_mapping("Vertical: JS Down", Qt::Key::Key_S, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
333331
ret.emplace_back(make_mapping("Vertical: JS Left", Qt::Key::Key_A, JoyconDeltas{.joystick_x = -1, .joystick_y = 0}));
332+
ret.emplace_back(make_mapping("Vertical: JS Down", Qt::Key::Key_S, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
333+
ret.emplace_back(make_mapping("Vertical: JS Right", Qt::Key::Key_D, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
334334

335335
ret.emplace_back(make_mapping("Vertical: Up", Qt::Key::Key_Up, JoyconDeltas{.buttons = BUTTON_UP}));
336336
ret.emplace_back(make_mapping("Vertical: Right", Qt::Key::Key_Right, JoyconDeltas{.buttons = BUTTON_RIGHT}));
@@ -342,9 +342,9 @@ std::vector<std::unique_ptr<EditableTableRow>> JoyconKeyboardMappingTable::make_
342342
ret.emplace_back(make_mapping("Vertical: JS-Click", Qt::Key::Key_C, JoyconDeltas{.buttons = BUTTON_LCLICK}));
343343

344344
ret.emplace_back(make_mapping("Sideways: JS Up", Qt::Key::Key_T, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
345-
ret.emplace_back(make_mapping("Sideways: JS Right", Qt::Key::Key_H, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
346-
ret.emplace_back(make_mapping("Sideways: JS Down", Qt::Key::Key_G, JoyconDeltas{.joystick_x = -1, .joystick_y = 0}));
347345
ret.emplace_back(make_mapping("Sideways: JS Left", Qt::Key::Key_F, JoyconDeltas{.joystick_x = 0, .joystick_y = -1}));
346+
ret.emplace_back(make_mapping("Sideways: JS Down", Qt::Key::Key_G, JoyconDeltas{.joystick_x = -1, .joystick_y = 0}));
347+
ret.emplace_back(make_mapping("Sideways: JS Right", Qt::Key::Key_H, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
348348

349349
ret.emplace_back(make_mapping("Sideways: Up", Qt::Key::Key_Apostrophe,JoyconDeltas{.buttons = BUTTON_RIGHT}));
350350
ret.emplace_back(make_mapping("Sideways: Up", Qt::Key::Key_QuoteDbl, JoyconDeltas{.buttons = BUTTON_RIGHT}));
@@ -369,9 +369,9 @@ std::vector<std::unique_ptr<EditableTableRow>> JoyconKeyboardMappingTable::make_
369369
ret.emplace_back(make_mapping("SR", Qt::Key::Key_F3, JoyconDeltas{.buttons = BUTTON_LEFT_SR}));
370370
}else{
371371
ret.emplace_back(make_mapping("Vertical: JS Up", Qt::Key::Key_W, JoyconDeltas{.joystick_x = 0, .joystick_y = -1}));
372-
ret.emplace_back(make_mapping("Vertical: JS Right", Qt::Key::Key_D, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
373-
ret.emplace_back(make_mapping("Vertical: JS Down", Qt::Key::Key_S, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
374372
ret.emplace_back(make_mapping("Vertical: JS Left", Qt::Key::Key_A, JoyconDeltas{.joystick_x = -1, .joystick_y = 0}));
373+
ret.emplace_back(make_mapping("Vertical: JS Down", Qt::Key::Key_S, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
374+
ret.emplace_back(make_mapping("Vertical: JS Right", Qt::Key::Key_D, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
375375

376376
ret.emplace_back(make_mapping("Vertical: X", Qt::Key::Key_Apostrophe,JoyconDeltas{.buttons = BUTTON_X}));
377377
ret.emplace_back(make_mapping("Vertical: X", Qt::Key::Key_QuoteDbl, JoyconDeltas{.buttons = BUTTON_X}));
@@ -390,9 +390,9 @@ std::vector<std::unique_ptr<EditableTableRow>> JoyconKeyboardMappingTable::make_
390390
ret.emplace_back(make_mapping("Vertical: JS-Click", Qt::Key::Key_C, JoyconDeltas{.buttons = BUTTON_RCLICK}));
391391

392392
ret.emplace_back(make_mapping("Sideways: JS Up", Qt::Key::Key_T, JoyconDeltas{.joystick_x = -1, .joystick_y = 0}));
393-
ret.emplace_back(make_mapping("Sideways: JS Right", Qt::Key::Key_H, JoyconDeltas{.joystick_x = 0, .joystick_y = -1}));
394-
ret.emplace_back(make_mapping("Sideways: JS Down", Qt::Key::Key_G, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
395393
ret.emplace_back(make_mapping("Sideways: JS Left", Qt::Key::Key_F, JoyconDeltas{.joystick_x = 0, .joystick_y = +1}));
394+
ret.emplace_back(make_mapping("Sideways: JS Down", Qt::Key::Key_G, JoyconDeltas{.joystick_x = +1, .joystick_y = 0}));
395+
ret.emplace_back(make_mapping("Sideways: JS Right", Qt::Key::Key_H, JoyconDeltas{.joystick_x = 0, .joystick_y = -1}));
396396

397397
ret.emplace_back(make_mapping("Sideways: X", Qt::Key::Key_Up, JoyconDeltas{.buttons = BUTTON_Y}));
398398
ret.emplace_back(make_mapping("Sideways: A", Qt::Key::Key_Right, JoyconDeltas{.buttons = BUTTON_X}));

SerialPrograms/Source/NintendoSwitch/DevPrograms/TestProgramSwitch.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
#include "PokemonSV/Programs/Farming/PokemonSV_MaterialFarmerTools.h"
119119
#include "PokemonSV/Programs/Farming/PokemonSV_TournamentFarmer.h"
120120
#include "NintendoSwitch/Programs/NintendoSwitch_NumberCodeEntry.h"
121+
#include "PokemonSV/Inference/ItemPrinter/PokemonSV_ItemPrinterMenuDetector.h"
121122

122123

123124
#include <QPixmap>
@@ -312,6 +313,13 @@ void TestProgram::program(MultiSwitchProgramEnvironment& env, CancellableScope&
312313

313314
// std::terminate();
314315

316+
auto image = feed.snapshot();
317+
318+
ItemPrinterMenuDetector detector(COLOR_GREEN);
319+
cout << detector.detect(image) << endl;
320+
321+
322+
315323
#if 0
316324
for (size_t i = 0; i < 100; i++){
317325
for (size_t c = 0; c < 2; c++){

SerialPrograms/Source/PanelLists.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ ProgramSelect::ProgramSelect(QWidget& parent, PanelHolder& holder)
4646

4747
add(std::make_unique<NintendoSwitch::PanelListFactory>());
4848
add(std::make_unique<NintendoSwitch::PokemonHome::PanelListFactory>());
49+
if (PreloadSettings::instance().DEVELOPER_MODE){
50+
add(std::make_unique<NintendoSwitch::PokemonLGPE::PanelListFactory>());
51+
}
4952
add(std::make_unique<NintendoSwitch::PokemonSwSh::PanelListFactory>());
5053
add(std::make_unique<NintendoSwitch::PokemonBDSP::PanelListFactory>());
5154
add(std::make_unique<NintendoSwitch::PokemonLA::PanelListFactory>());
5255
add(std::make_unique<NintendoSwitch::PokemonSV::PanelListFactory>());
53-
if (PreloadSettings::instance().DEVELOPER_MODE) {
56+
if (PreloadSettings::instance().DEVELOPER_MODE){
5457
add(std::make_unique<NintendoSwitch::PokemonRSE::PanelListFactory>());
55-
add(std::make_unique<NintendoSwitch::PokemonLGPE::PanelListFactory>());
5658
}
5759
add(std::make_unique<NintendoSwitch::ZeldaTotK::PanelListFactory>());
5860

0 commit comments

Comments
 (0)