Skip to content

Commit b5bd010

Browse files
committed
Add log when setting console type.
1 parent 27d468d commit b5bd010

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

SerialPrograms/Source/ML/Programs/ML_LabelImages.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,15 @@ void LabelImages::load_image_related_data(const std::string& image_path, size_t
284284
try{
285285
ObjectAnnotation anno_obj = json_to_object_annotation((*json_array)[i]);
286286
m_annotated_objects.emplace_back(std::move(anno_obj));
287-
} catch([[maybe_unused]] JsonParseException & e){
287+
} catch(JsonParseException&){
288288
m_fail_to_load_annotation_file = true;
289289
QMessageBox box;
290290
box.warning(nullptr, "Unable to Load Annotation",
291-
QString::fromStdString("Cannot load annotation file " + m_annotation_file_path +
292-
". Parsing object " + std::to_string(i) + " failed."));
291+
QString::fromStdString(
292+
"Cannot load annotation file " + m_annotation_file_path +
293+
". Parsing object " + std::to_string(i) + " failed."
294+
)
295+
);
293296
}
294297
}
295298
m_last_object_idx = m_annotated_objects.size();

SerialPrograms/Source/NintendoSwitch/NintendoSwitch_ConsoleState.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const char* ConsoleType_strings(ConsoleType type){
3434
){
3535
throw UserSetupError(
3636
logger,
37-
std::string("Conflicting console types:") +
37+
std::string("Conflicting Console Types:") +
3838
"\n User Selected: " + ConsoleType_strings(user_type) +
3939
"\n Detected Type: " + ConsoleType_strings(detected_type)
4040
);
@@ -127,6 +127,8 @@ void ConsoleState::set_console_type(Logger& logger, ConsoleType type){
127127

128128
}while (false);
129129

130+
logger.log(std::string("Setting console type to: ") + ConsoleType_strings(type));
131+
130132
m_data->m_console_type.store(type, std::memory_order_relaxed);
131133
m_data->m_console_type_confirmed.store(confirmed, std::memory_order_relaxed);
132134
}

0 commit comments

Comments
 (0)