mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-26 17:37:54 -05:00
Merge remote-tracking branch 'origin/master' into typos3
This commit is contained in:
@ -41,7 +41,7 @@ void UpdateController(Core::HID::EmulatedController* controller,
|
||||
bool IsControllerCompatible(Core::HID::NpadStyleIndex controller_type,
|
||||
Core::Frontend::ControllerParameters parameters) {
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
return parameters.allow_pro_controller;
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
return parameters.allow_dual_joycons;
|
||||
@ -462,7 +462,7 @@ void QtControllerSelectorDialog::SetEmulatedControllers(std::size_t player_index
|
||||
};
|
||||
|
||||
if (npad_style_set.fullkey == 1) {
|
||||
add_item(Core::HID::NpadStyleIndex::ProController, tr("Pro Controller"));
|
||||
add_item(Core::HID::NpadStyleIndex::Fullkey, tr("Pro Controller"));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_dual == 1) {
|
||||
@ -519,7 +519,7 @@ Core::HID::NpadStyleIndex QtControllerSelectorDialog::GetControllerTypeFromIndex
|
||||
[index](const auto& pair) { return pair.first == index; });
|
||||
|
||||
if (it == pairs.end()) {
|
||||
return Core::HID::NpadStyleIndex::ProController;
|
||||
return Core::HID::NpadStyleIndex::Fullkey;
|
||||
}
|
||||
|
||||
return it->second;
|
||||
@ -549,7 +549,7 @@ void QtControllerSelectorDialog::UpdateControllerIcon(std::size_t player_index)
|
||||
const QString stylesheet = [this, player_index] {
|
||||
switch (GetControllerTypeFromIndex(emulated_controllers[player_index]->currentIndex(),
|
||||
player_index)) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
return QStringLiteral("image: url(:/controller/applet_pro_controller%0); ");
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
|
@ -832,7 +832,7 @@ void QtSoftwareKeyboardDialog::SetControllerImage() {
|
||||
}();
|
||||
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
ui->icon_controller->setStyleSheet(
|
||||
QStringLiteral("image: url(:/overlay/controller_pro%1.png);").arg(theme));
|
||||
|
@ -1094,7 +1094,7 @@ void ConfigureInputPlayer::SetConnectableControllers() {
|
||||
};
|
||||
|
||||
if (npad_style_set.fullkey == 1) {
|
||||
add_item(Core::HID::NpadStyleIndex::ProController, tr("Pro Controller"));
|
||||
add_item(Core::HID::NpadStyleIndex::Fullkey, tr("Pro Controller"));
|
||||
}
|
||||
|
||||
if (npad_style_set.joycon_dual == 1) {
|
||||
@ -1149,7 +1149,7 @@ Core::HID::NpadStyleIndex ConfigureInputPlayer::GetControllerTypeFromIndex(int i
|
||||
[index](const auto& pair) { return pair.first == index; });
|
||||
|
||||
if (it == index_controller_type_pairs.end()) {
|
||||
return Core::HID::NpadStyleIndex::ProController;
|
||||
return Core::HID::NpadStyleIndex::Fullkey;
|
||||
}
|
||||
|
||||
return it->second;
|
||||
@ -1178,7 +1178,7 @@ void ConfigureInputPlayer::UpdateInputDevices() {
|
||||
void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
||||
auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex());
|
||||
if (debug) {
|
||||
layout = Core::HID::NpadStyleIndex::ProController;
|
||||
layout = Core::HID::NpadStyleIndex::Fullkey;
|
||||
}
|
||||
|
||||
// List of all the widgets that will be hidden by any of the following layouts that need
|
||||
@ -1206,7 +1206,7 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
||||
|
||||
std::vector<QWidget*> layout_hidden;
|
||||
switch (layout) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
layout_hidden = {
|
||||
ui->buttonShoulderButtonsSLSRLeft,
|
||||
@ -1254,7 +1254,7 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
||||
void ConfigureInputPlayer::UpdateControllerEnabledButtons() {
|
||||
auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex());
|
||||
if (debug) {
|
||||
layout = Core::HID::NpadStyleIndex::ProController;
|
||||
layout = Core::HID::NpadStyleIndex::Fullkey;
|
||||
}
|
||||
|
||||
// List of all the widgets that will be disabled by any of the following layouts that need
|
||||
@ -1271,7 +1271,7 @@ void ConfigureInputPlayer::UpdateControllerEnabledButtons() {
|
||||
|
||||
std::vector<QWidget*> layout_disable;
|
||||
switch (layout) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
@ -1304,7 +1304,7 @@ void ConfigureInputPlayer::UpdateMotionButtons() {
|
||||
|
||||
// Show/hide the "Motion 1/2" groupboxes depending on the currently selected controller.
|
||||
switch (GetControllerTypeFromIndex(ui->comboControllerType->currentIndex())) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
// Show "Motion 1" and hide "Motion 2".
|
||||
@ -1333,11 +1333,11 @@ void ConfigureInputPlayer::UpdateMotionButtons() {
|
||||
void ConfigureInputPlayer::UpdateControllerButtonNames() {
|
||||
auto layout = GetControllerTypeFromIndex(ui->comboControllerType->currentIndex());
|
||||
if (debug) {
|
||||
layout = Core::HID::NpadStyleIndex::ProController;
|
||||
layout = Core::HID::NpadStyleIndex::Fullkey;
|
||||
}
|
||||
|
||||
switch (layout) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
|
@ -244,7 +244,7 @@ void PlayerControlPreview::paintEvent(QPaintEvent* event) {
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
DrawGCController(p, center);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
default:
|
||||
DrawProController(p, center);
|
||||
break;
|
||||
|
@ -205,6 +205,7 @@ void ConfigureProfileManager::AddUser() {
|
||||
|
||||
const auto uuid = Common::UUID::MakeRandom();
|
||||
profile_manager.CreateNewUser(uuid, username.toStdString());
|
||||
profile_manager.WriteUserSaveFile();
|
||||
|
||||
item_model->appendRow(new QStandardItem{GetIcon(uuid), FormatUserEntryText(username, uuid)});
|
||||
}
|
||||
@ -228,6 +229,7 @@ void ConfigureProfileManager::RenameUser() {
|
||||
std::copy(username_std.begin(), username_std.end(), profile.username.begin());
|
||||
|
||||
profile_manager.SetProfileBase(*uuid, profile);
|
||||
profile_manager.WriteUserSaveFile();
|
||||
|
||||
item_model->setItem(
|
||||
user, 0,
|
||||
@ -256,6 +258,8 @@ void ConfigureProfileManager::DeleteUser(const Common::UUID& uuid) {
|
||||
return;
|
||||
}
|
||||
|
||||
profile_manager.WriteUserSaveFile();
|
||||
|
||||
item_model->removeRows(tree_view->currentIndex().row(), 1);
|
||||
tree_view->clearSelection();
|
||||
|
||||
|
@ -2292,14 +2292,14 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
|
||||
ASSERT(user_id);
|
||||
|
||||
const auto user_save_data_path = FileSys::SaveDataFactory::GetFullPath(
|
||||
*system, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser,
|
||||
{}, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser,
|
||||
FileSys::SaveDataType::SaveData, program_id, user_id->AsU128(), 0);
|
||||
|
||||
path = Common::FS::ConcatPathSafe(nand_dir, user_save_data_path);
|
||||
} else {
|
||||
// Device save data
|
||||
const auto device_save_data_path = FileSys::SaveDataFactory::GetFullPath(
|
||||
*system, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser,
|
||||
{}, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser,
|
||||
FileSys::SaveDataType::SaveData, program_id, {}, 0);
|
||||
|
||||
path = Common::FS::ConcatPathSafe(nand_dir, device_save_data_path);
|
||||
@ -2662,8 +2662,8 @@ void GMainWindow::RemoveCacheStorage(u64 program_id) {
|
||||
vfs->OpenDirectory(Common::FS::PathToUTF8String(nand_dir), FileSys::Mode::Read);
|
||||
|
||||
const auto cache_storage_path = FileSys::SaveDataFactory::GetFullPath(
|
||||
*system, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser,
|
||||
FileSys::SaveDataType::CacheStorage, 0 /* program_id */, {}, 0);
|
||||
{}, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser, FileSys::SaveDataType::CacheStorage,
|
||||
0 /* program_id */, {}, 0);
|
||||
|
||||
const auto path = Common::FS::ConcatPathSafe(nand_dir, cache_storage_path);
|
||||
|
||||
@ -3988,7 +3988,7 @@ void GMainWindow::OnToggleDockedMode() {
|
||||
tr("Handheld controller can't be used on docked mode. Pro "
|
||||
"controller will be selected."));
|
||||
handheld->Disconnect();
|
||||
player_1->SetNpadStyleIndex(Core::HID::NpadStyleIndex::ProController);
|
||||
player_1->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Fullkey);
|
||||
player_1->Connect();
|
||||
controller_dialog->refreshConfiguration();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void ControllerNavigation::ControllerUpdateButton() {
|
||||
}
|
||||
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
@ -116,7 +116,7 @@ void ControllerNavigation::ControllerUpdateStick() {
|
||||
}
|
||||
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::Fullkey:
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
|
Reference in New Issue
Block a user