Skip to content

Commit 7c436da

Browse files
committed
minor UI updates
1 parent 146d41d commit 7c436da

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_RecordKeyboardController.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,20 @@ RecordKeyboardController::RecordKeyboardController()
5050
)
5151
, FILE_NAME(
5252
false,
53-
"Name of the JSON file to read/write.",
53+
"<b>Name of the JSON file to read/write.</b>",
5454
LockMode::LOCK_WHILE_RUNNING,
55-
"recording",
55+
"UserSettings/recording",
5656
"<name of JSON file>"
5757
)
58+
, GENERATE_CPP_CODE_AFTER_RECORDING(
59+
"<b>[For Developers] Generate C++ code text file, after recording:</b>",
60+
LockMode::UNLOCK_WHILE_RUNNING,
61+
false
62+
)
5863
{
5964
PA_ADD_OPTION(MODE);
6065
PA_ADD_OPTION(FILE_NAME);
66+
PA_ADD_OPTION(GENERATE_CPP_CODE_AFTER_RECORDING);
6167
}
6268

6369

@@ -84,7 +90,9 @@ void RecordKeyboardController::program(SingleSwitchProgramEnvironment& env, Canc
8490
json.dump(output_json_filename);
8591
m_controller_history.clear();
8692

87-
json_to_cpp_code(env.console.logger(), json, FILE_NAME);
93+
if (GENERATE_CPP_CODE_AFTER_RECORDING){
94+
json_to_cpp_code(env.console.logger(), json, FILE_NAME);
95+
}
8896

8997
context.controller().remove_keyboard_listener(*this);
9098

SerialPrograms/Source/NintendoSwitch/Programs/NintendoSwitch_RecordKeyboardController.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include <functional>
1111
#include "Common/Cpp/Json/JsonObject.h"
12+
#include "Common/Cpp/Options/BooleanCheckBoxOption.h"
1213
#include "Common/Cpp/Options/StringOption.h"
1314
#include "NintendoSwitch/Controllers/NintendoSwitch_Joycon.h"
1415
#include "Controllers/KeyboardInput/KeyboardInput.h"
@@ -131,6 +132,7 @@ class RecordKeyboardController : public SingleSwitchProgramInstance, public Keyb
131132
};
132133
EnumDropdownOption<Mode> MODE;
133134
StringOption FILE_NAME;
135+
BooleanCheckBoxOption GENERATE_CPP_CODE_AFTER_RECORDING;
134136

135137
std::vector<ControllerStateSnapshot> m_controller_history;
136138

0 commit comments

Comments
 (0)