Skip to content

Commit f475224

Browse files
committed
Auto-detect console type for number code entry as well.
1 parent b3b9558 commit f475224

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

SerialPrograms/Source/NintendoSwitch/Programs/FastCodeEntry/NintendoSwitch_KeyboardCodeEntry.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,8 @@ void keyboard_enter_code(
286286

287287

288288
ConsoleType console_type = console.state().console_type();
289-
290289
if (console_type == ConsoleType::Unknown){
291-
console.log("Unknown Switch type. Try to detect.");
290+
console.log("Unknown Switch type. Try to detect.", COLOR_ORANGE);
292291
console_type = detect_console_type_from_in_game(console, context);
293292
}
294293
bool switch2;

SerialPrograms/Source/NintendoSwitch/Programs/FastCodeEntry/NintendoSwitch_NumberCodeEntry.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "NintendoSwitch/NintendoSwitch_Settings.h"
1010
#include "NintendoSwitch/Commands/NintendoSwitch_Commands_Superscalar.h"
1111
#include "NintendoSwitch/Options/NintendoSwitch_CodeEntrySettingsOption.h"
12+
#include "NintendoSwitch/Inference/NintendoSwitch_ConsoleTypeDetector.h"
1213
#include "NintendoSwitch_CodeEntryTools.h"
1314
#include "NintendoSwitch_NumberCodeEntry.h"
1415

@@ -193,6 +194,10 @@ void numberpad_enter_code(
193194

194195

195196
ConsoleType console_type = console.state().console_type();
197+
if (console_type == ConsoleType::Unknown){
198+
console.log("Unknown Switch type. Try to detect.", COLOR_ORANGE);
199+
console_type = detect_console_type_from_in_game(console, context);
200+
}
196201
bool switch2;
197202
if (is_switch1(console_type)){
198203
switch2 = false;

0 commit comments

Comments
 (0)