diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input.ui | 2 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 17 | ||||
| -rw-r--r-- | src/yuzu/main.h | 1 |
7 files changed, 46 insertions, 4 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 73bf626d4..566695fde 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -182,8 +182,9 @@ create_target_directory_groups(common) | |||
| 182 | 182 | ||
| 183 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) | 183 | target_link_libraries(common PUBLIC ${Boost_LIBRARIES} fmt::fmt microprofile Threads::Threads) |
| 184 | target_link_libraries(common PRIVATE lz4::lz4 xbyak) | 184 | target_link_libraries(common PRIVATE lz4::lz4 xbyak) |
| 185 | if (MSVC) | 185 | if (TARGET zstd::zstd) |
| 186 | target_link_libraries(common PRIVATE zstd::zstd) | 186 | target_link_libraries(common PRIVATE zstd::zstd) |
| 187 | else() | 187 | else() |
| 188 | target_link_libraries(common PRIVATE zstd) | 188 | target_link_libraries(common PRIVATE |
| 189 | $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>) | ||
| 189 | endif() | 190 | endif() |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 9c62ebc60..9116dd77c 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -636,6 +636,10 @@ void AppletMessageQueue::RequestExit() { | |||
| 636 | PushMessage(AppletMessage::Exit); | 636 | PushMessage(AppletMessage::Exit); |
| 637 | } | 637 | } |
| 638 | 638 | ||
| 639 | void AppletMessageQueue::RequestResume() { | ||
| 640 | PushMessage(AppletMessage::Resume); | ||
| 641 | } | ||
| 642 | |||
| 639 | void AppletMessageQueue::FocusStateChanged() { | 643 | void AppletMessageQueue::FocusStateChanged() { |
| 640 | PushMessage(AppletMessage::FocusStateChanged); | 644 | PushMessage(AppletMessage::FocusStateChanged); |
| 641 | } | 645 | } |
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 988ead215..53144427b 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -90,6 +90,7 @@ public: | |||
| 90 | AppletMessage PopMessage(); | 90 | AppletMessage PopMessage(); |
| 91 | std::size_t GetMessageCount() const; | 91 | std::size_t GetMessageCount() const; |
| 92 | void RequestExit(); | 92 | void RequestExit(); |
| 93 | void RequestResume(); | ||
| 93 | void FocusStateChanged(); | 94 | void FocusStateChanged(); |
| 94 | void OperationModeChanged(); | 95 | void OperationModeChanged(); |
| 95 | 96 | ||
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 5114b8be2..3e9dc4a13 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp | |||
| @@ -720,7 +720,25 @@ std::pair<s32, Errno> BSD::RecvImpl(s32 fd, u32 flags, std::vector<u8>& message) | |||
| 720 | if (!IsFileDescriptorValid(fd)) { | 720 | if (!IsFileDescriptorValid(fd)) { |
| 721 | return {-1, Errno::BADF}; | 721 | return {-1, Errno::BADF}; |
| 722 | } | 722 | } |
| 723 | return Translate(file_descriptors[fd]->socket->Recv(flags, message)); | 723 | |
| 724 | FileDescriptor& descriptor = *file_descriptors[fd]; | ||
| 725 | |||
| 726 | // Apply flags | ||
| 727 | if ((flags & FLAG_MSG_DONTWAIT) != 0) { | ||
| 728 | flags &= ~FLAG_MSG_DONTWAIT; | ||
| 729 | if ((descriptor.flags & FLAG_O_NONBLOCK) == 0) { | ||
| 730 | descriptor.socket->SetNonBlock(true); | ||
| 731 | } | ||
| 732 | } | ||
| 733 | |||
| 734 | const auto [ret, bsd_errno] = Translate(descriptor.socket->Recv(flags, message)); | ||
| 735 | |||
| 736 | // Restore original state | ||
| 737 | if ((descriptor.flags & FLAG_O_NONBLOCK) == 0) { | ||
| 738 | descriptor.socket->SetNonBlock(false); | ||
| 739 | } | ||
| 740 | |||
| 741 | return {ret, bsd_errno}; | ||
| 724 | } | 742 | } |
| 725 | 743 | ||
| 726 | std::pair<s32, Errno> BSD::RecvFromImpl(s32 fd, u32 flags, std::vector<u8>& message, | 744 | std::pair<s32, Errno> BSD::RecvFromImpl(s32 fd, u32 flags, std::vector<u8>& message, |
diff --git a/src/yuzu/configuration/configure_input.ui b/src/yuzu/configuration/configure_input.ui index 2707025e7..d51774028 100644 --- a/src/yuzu/configuration/configure_input.ui +++ b/src/yuzu/configuration/configure_input.ui | |||
| @@ -166,7 +166,7 @@ | |||
| 166 | <item> | 166 | <item> |
| 167 | <widget class="QRadioButton" name="radioUndocked"> | 167 | <widget class="QRadioButton" name="radioUndocked"> |
| 168 | <property name="text"> | 168 | <property name="text"> |
| 169 | <string>Undocked</string> | 169 | <string>Handheld</string> |
| 170 | </property> | 170 | </property> |
| 171 | </widget> | 171 | </widget> |
| 172 | </item> | 172 | </item> |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ed802d329..e60d84054 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1131,6 +1131,7 @@ void GMainWindow::OnAppFocusStateChanged(Qt::ApplicationState state) { | |||
| 1131 | OnPauseGame(); | 1131 | OnPauseGame(); |
| 1132 | } else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) { | 1132 | } else if (!emu_thread->IsRunning() && auto_paused && state == Qt::ApplicationActive) { |
| 1133 | auto_paused = false; | 1133 | auto_paused = false; |
| 1134 | RequestGameResume(); | ||
| 1134 | OnStartGame(); | 1135 | OnStartGame(); |
| 1135 | } | 1136 | } |
| 1136 | } | 1137 | } |
| @@ -2570,6 +2571,7 @@ void GMainWindow::OnPauseContinueGame() { | |||
| 2570 | if (emu_thread->IsRunning()) { | 2571 | if (emu_thread->IsRunning()) { |
| 2571 | OnPauseGame(); | 2572 | OnPauseGame(); |
| 2572 | } else { | 2573 | } else { |
| 2574 | RequestGameResume(); | ||
| 2573 | OnStartGame(); | 2575 | OnStartGame(); |
| 2574 | } | 2576 | } |
| 2575 | } | 2577 | } |
| @@ -3749,6 +3751,21 @@ void GMainWindow::RequestGameExit() { | |||
| 3749 | } | 3751 | } |
| 3750 | } | 3752 | } |
| 3751 | 3753 | ||
| 3754 | void GMainWindow::RequestGameResume() { | ||
| 3755 | auto& sm{system->ServiceManager()}; | ||
| 3756 | auto applet_oe = sm.GetService<Service::AM::AppletOE>("appletOE"); | ||
| 3757 | auto applet_ae = sm.GetService<Service::AM::AppletAE>("appletAE"); | ||
| 3758 | |||
| 3759 | if (applet_oe != nullptr) { | ||
| 3760 | applet_oe->GetMessageQueue()->RequestResume(); | ||
| 3761 | return; | ||
| 3762 | } | ||
| 3763 | |||
| 3764 | if (applet_ae != nullptr) { | ||
| 3765 | applet_ae->GetMessageQueue()->RequestResume(); | ||
| 3766 | } | ||
| 3767 | } | ||
| 3768 | |||
| 3752 | void GMainWindow::filterBarSetChecked(bool state) { | 3769 | void GMainWindow::filterBarSetChecked(bool state) { |
| 3753 | ui->action_Show_Filter_Bar->setChecked(state); | 3770 | ui->action_Show_Filter_Bar->setChecked(state); |
| 3754 | emit(OnToggleFilterBar()); | 3771 | emit(OnToggleFilterBar()); |
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 8cf224c9c..09e37f152 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -244,6 +244,7 @@ private: | |||
| 244 | bool ConfirmChangeGame(); | 244 | bool ConfirmChangeGame(); |
| 245 | bool ConfirmForceLockedExit(); | 245 | bool ConfirmForceLockedExit(); |
| 246 | void RequestGameExit(); | 246 | void RequestGameExit(); |
| 247 | void RequestGameResume(); | ||
| 247 | void closeEvent(QCloseEvent* event) override; | 248 | void closeEvent(QCloseEvent* event) override; |
| 248 | 249 | ||
| 249 | private slots: | 250 | private slots: |