mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
Address more reviews
This commit is contained in:
parent
781d4b787a
commit
1517d2fef7
@ -26,8 +26,9 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel
|
||||
buttons->addButton(tr(MII_BUTTON_CANCEL), QDialogButtonBox::ButtonRole::RejectRole);
|
||||
}
|
||||
|
||||
setWindowTitle(config.title.empty() ? tr("Mii Selector")
|
||||
: QString::fromStdU16String(config.title));
|
||||
setWindowTitle(config.title.empty() || config.title.at(0) == '\x0000'
|
||||
? tr("Mii Selector")
|
||||
: QString::fromStdU16String(config.title));
|
||||
|
||||
miis.push_back(HLE::Applets::MiiSelector::GetStandardMiiResult().selected_mii_data);
|
||||
combobox->addItem(tr("Standard Mii"));
|
||||
@ -35,7 +36,7 @@ QtMiiSelectorDialog::QtMiiSelectorDialog(QWidget* parent, QtMiiSelector* mii_sel
|
||||
std::string nand_directory{FileUtil::GetUserPath(FileUtil::UserPath::NANDDir)};
|
||||
FileSys::ArchiveFactory_ExtSaveData extdata_archive_factory(nand_directory, true);
|
||||
|
||||
auto archive_result = extdata_archive_factory.Open(Service::PTM::ptm_shared_extdata_id);
|
||||
auto archive_result = extdata_archive_factory.Open(Service::PTM::ptm_shared_extdata_id, 0);
|
||||
if (archive_result.Succeeded()) {
|
||||
auto archive = std::move(archive_result).Unwrap();
|
||||
|
||||
|
@ -142,7 +142,10 @@ MiiResult MiiSelector::GetStandardMiiResult() {
|
||||
Frontend::MiiSelectorConfig MiiSelector::ToFrontendConfig(const MiiConfig& config) const {
|
||||
Frontend::MiiSelectorConfig frontend_config;
|
||||
frontend_config.enable_cancel_button = config.enable_cancel_button == 1;
|
||||
frontend_config.title = reinterpret_cast<const char16_t*>(config.title.data());
|
||||
std::transform(config.title.begin(), config.title.end(),
|
||||
std::back_inserter(frontend_config.title), [](u16_le character) -> char16_t {
|
||||
return static_cast<char16_t>(static_cast<u16>(character));
|
||||
});
|
||||
frontend_config.initially_selected_mii_index = config.initially_selected_mii_index;
|
||||
return frontend_config;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ struct MiiConfig {
|
||||
u8 enable_guest_mii;
|
||||
u8 show_on_top_screen;
|
||||
INSERT_PADDING_BYTES(5);
|
||||
std::array<u16, 0x40> title;
|
||||
std::array<u16_le, 0x40> title;
|
||||
INSERT_PADDING_BYTES(4);
|
||||
u8 show_guest_miis;
|
||||
INSERT_PADDING_BYTES(3);
|
||||
|
Loading…
Reference in New Issue
Block a user