Compare commits

...

6 Commits

Author SHA1 Message Date
Hugo Locurcio
345d691328 Add hotkeys for multiplayer actions
Default shortcuts were chosen as to be intuitive (use the first letter
of the action, or the second word's first letter) and work on all
types of keyboards. The hotkeys can be used while playing a game too,
as they are application-wide.
2024-01-30 01:32:14 +01:00
liamwhite
8ddfecfbae Merge pull request #12846 from german77/mii_const
service: mii: Set arguments as const
2024-01-29 15:27:12 -05:00
liamwhite
51f5a6f1f8 Merge pull request #12830 from merryhime/dynamic-dual_code_block
externals/dynarmic: Update to 6.6.1
2024-01-29 15:27:04 -05:00
Narr the Reg
64fca24b32 service: mii: Set arguments as const 2024-01-29 11:22:44 -06:00
Merry
6cc82fd430 externals/dynarmic: Update to 6.6.1 2024-01-28 17:04:01 +00:00
Merry
2bc0132d0c externals/oaknut: Update to 2.0.1 2024-01-28 16:50:14 +00:00
5 changed files with 23 additions and 10 deletions

View File

@@ -111,7 +111,8 @@ private:
R_RETURN(result);
}
Result UpdateLatest(Out<CharInfo> out_char_info, CharInfo& char_info, SourceFlag source_flag) {
Result UpdateLatest(Out<CharInfo> out_char_info, const CharInfo& char_info,
SourceFlag source_flag) {
LOG_INFO(Service_Mii, "called with source_flag={}", source_flag);
R_RETURN(manager->UpdateLatest(metadata, *out_char_info, char_info, source_flag));
@@ -159,7 +160,7 @@ private:
R_RETURN(result);
}
Result UpdateLatest1(Out<StoreData> out_store_data, StoreData& store_data,
Result UpdateLatest1(Out<StoreData> out_store_data, const StoreData& store_data,
SourceFlag source_flag) {
LOG_INFO(Service_Mii, "called with source_flag={}", source_flag);
R_UNLESS(is_system, ResultPermissionDenied);
@@ -243,7 +244,7 @@ private:
R_SUCCEED();
}
Result GetIndex(Out<s32> out_index, CharInfo& char_info) {
Result GetIndex(Out<s32> out_index, const CharInfo& char_info) {
LOG_DEBUG(Service_Mii, "called");
R_RETURN(manager->GetIndex(metadata, char_info, *out_index));
@@ -257,25 +258,25 @@ private:
R_SUCCEED();
}
Result Convert(Out<CharInfo> out_char_info, Ver3StoreData& mii_v3) {
Result Convert(Out<CharInfo> out_char_info, const Ver3StoreData& mii_v3) {
LOG_INFO(Service_Mii, "called");
R_RETURN(manager->ConvertV3ToCharInfo(*out_char_info, mii_v3));
}
Result ConvertCoreDataToCharInfo(Out<CharInfo> out_char_info, CoreData& core_data) {
Result ConvertCoreDataToCharInfo(Out<CharInfo> out_char_info, const CoreData& core_data) {
LOG_INFO(Service_Mii, "called");
R_RETURN(manager->ConvertCoreDataToCharInfo(*out_char_info, core_data));
}
Result ConvertCharInfoToCoreData(Out<CoreData> out_core_data, CharInfo& char_info) {
Result ConvertCharInfoToCoreData(Out<CoreData> out_core_data, const CharInfo& char_info) {
LOG_INFO(Service_Mii, "called");
R_RETURN(manager->ConvertCharInfoToCoreData(*out_core_data, char_info));
}
Result Append(CharInfo& char_info) {
Result Append(const CharInfo& char_info) {
LOG_INFO(Service_Mii, "called");
R_RETURN(manager->Append(metadata, char_info));

View File

@@ -1350,6 +1350,13 @@ void GMainWindow::InitializeHotkeys() {
LinkActionShortcut(ui->action_TAS_Start, QStringLiteral("TAS Start/Stop"), true);
LinkActionShortcut(ui->action_TAS_Record, QStringLiteral("TAS Record"), true);
LinkActionShortcut(ui->action_TAS_Reset, QStringLiteral("TAS Reset"), true);
LinkActionShortcut(ui->action_View_Lobby,
QStringLiteral("Multiplayer Browse Public Game Lobby"));
LinkActionShortcut(ui->action_Start_Room, QStringLiteral("Multiplayer Create Room"));
LinkActionShortcut(ui->action_Connect_To_Room,
QStringLiteral("Multiplayer Direct Connect to Room"));
LinkActionShortcut(ui->action_Show_Room, QStringLiteral("Multiplayer Show Current Room"));
LinkActionShortcut(ui->action_Leave_Room, QStringLiteral("Multiplayer Leave Room"));
static const QString main_window = QStringLiteral("Main Window");
const auto connect_shortcut = [&]<typename Fn>(const QString& action_name, const Fn& function) {

View File

@@ -222,7 +222,7 @@ void RestoreWindowState(std::unique_ptr<QtConfig>& qtConfig);
// This must be in alphabetical order according to action name as it must have the same order as
// UISetting::values.shortcuts, which is alphabetically ordered.
// clang-format off
const std::array<Shortcut, 23> default_hotkeys{{
const std::array<Shortcut, 28> default_hotkeys{{
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Mute/Unmute")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+M"), std::string("Home+Dpad_Right"), Qt::WindowShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Volume Down")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("-"), std::string("Home+Dpad_Down"), Qt::ApplicationShortcut, true}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Audio Volume Up")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("="), std::string("Home+Dpad_Up"), Qt::ApplicationShortcut, true}},
@@ -236,6 +236,11 @@ const std::array<Shortcut, 23> default_hotkeys{{
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Fullscreen")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F11"), std::string("Home+B"), Qt::WindowShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Load File")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+O"), std::string(""), Qt::WidgetWithChildrenShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Load/Remove Amiibo")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F2"), std::string("Home+A"), Qt::WidgetWithChildrenShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Multiplayer Browse Public Game Lobby")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+B"), std::string(""), Qt::ApplicationShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Multiplayer Create Room")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+N"), std::string(""), Qt::ApplicationShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Multiplayer Direct Connect to Room")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+C"), std::string(""), Qt::ApplicationShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Multiplayer Leave Room")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+L"), std::string(""), Qt::ApplicationShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Multiplayer Show Current Room")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+R"), std::string(""), Qt::ApplicationShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Restart Emulation")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F6"), std::string("R+Plus+Minus"), Qt::WindowShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Stop Emulation")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F5"), std::string("L+Plus+Minus"), Qt::WindowShortcut, false}},
{QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "TAS Record")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+F7"), std::string(""), Qt::ApplicationShortcut, false}},