diff options
| author | 2024-02-04 16:05:44 -0500 | |
|---|---|---|
| committer | 2024-02-09 09:20:53 -0500 | |
| commit | b206ea5cfe90bca01b48e44a0cf93cb51f4877d1 (patch) | |
| tree | 33e6fd07e5dd6e802f71f2830d6c66a2b44fbefd | |
| parent | am: stub SetMediaPlaybackState for self controller (diff) | |
| download | yuzu-b206ea5cfe90bca01b48e44a0cf93cb51f4877d1.tar.gz yuzu-b206ea5cfe90bca01b48e44a0cf93cb51f4877d1.tar.xz yuzu-b206ea5cfe90bca01b48e44a0cf93cb51f4877d1.zip | |
am: fix focus states and display of indirect keyboard
| -rw-r--r-- | src/core/hle/service/am/library_applet_creator.cpp | 18 | ||||
| -rw-r--r-- | src/core/hle/service/am/system_buffer_manager.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/am/window_controller.cpp | 4 |
3 files changed, 10 insertions, 15 deletions
diff --git a/src/core/hle/service/am/library_applet_creator.cpp b/src/core/hle/service/am/library_applet_creator.cpp index a883a021e..c48ed29bc 100644 --- a/src/core/hle/service/am/library_applet_creator.cpp +++ b/src/core/hle/service/am/library_applet_creator.cpp | |||
| @@ -118,23 +118,17 @@ std::shared_ptr<ILibraryAppletAccessor> CreateGuestApplet(Core::System& system, | |||
| 118 | switch (mode) { | 118 | switch (mode) { |
| 119 | case LibraryAppletMode::AllForeground: | 119 | case LibraryAppletMode::AllForeground: |
| 120 | case LibraryAppletMode::NoUi: | 120 | case LibraryAppletMode::NoUi: |
| 121 | applet->focus_state = FocusState::InFocus; | 121 | case LibraryAppletMode::PartialForeground: |
| 122 | case LibraryAppletMode::PartialForegroundIndirectDisplay: | ||
| 122 | applet->hid_registration.EnableAppletToGetInput(true); | 123 | applet->hid_registration.EnableAppletToGetInput(true); |
| 124 | applet->focus_state = FocusState::InFocus; | ||
| 123 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground); | 125 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground); |
| 124 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged); | ||
| 125 | break; | 126 | break; |
| 126 | case LibraryAppletMode::AllForegroundInitiallyHidden: | 127 | case LibraryAppletMode::AllForegroundInitiallyHidden: |
| 127 | applet->system_buffer_manager.SetWindowVisibility(false); | ||
| 128 | applet->focus_state = FocusState::NotInFocus; | ||
| 129 | applet->hid_registration.EnableAppletToGetInput(false); | 128 | applet->hid_registration.EnableAppletToGetInput(false); |
| 130 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged); | 129 | applet->focus_state = FocusState::NotInFocus; |
| 131 | break; | 130 | applet->system_buffer_manager.SetWindowVisibility(false); |
| 132 | case LibraryAppletMode::PartialForeground: | 131 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoBackground); |
| 133 | case LibraryAppletMode::PartialForegroundIndirectDisplay: | ||
| 134 | default: | ||
| 135 | applet->focus_state = FocusState::Background; | ||
| 136 | applet->hid_registration.EnableAppletToGetInput(true); | ||
| 137 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged); | ||
| 138 | break; | 132 | break; |
| 139 | } | 133 | } |
| 140 | 134 | ||
diff --git a/src/core/hle/service/am/system_buffer_manager.cpp b/src/core/hle/service/am/system_buffer_manager.cpp index 7fb9e3a75..48923fe41 100644 --- a/src/core/hle/service/am/system_buffer_manager.cpp +++ b/src/core/hle/service/am/system_buffer_manager.cpp | |||
| @@ -38,7 +38,8 @@ bool SystemBufferManager::Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel: | |||
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | Nvnflinger::LayerBlending blending = Nvnflinger::LayerBlending::None; | 40 | Nvnflinger::LayerBlending blending = Nvnflinger::LayerBlending::None; |
| 41 | if (mode == LibraryAppletMode::PartialForeground) { | 41 | if (mode == LibraryAppletMode::PartialForeground || |
| 42 | mode == LibraryAppletMode::PartialForegroundIndirectDisplay) { | ||
| 42 | blending = Nvnflinger::LayerBlending::Coverage; | 43 | blending = Nvnflinger::LayerBlending::Coverage; |
| 43 | } | 44 | } |
| 44 | 45 | ||
diff --git a/src/core/hle/service/am/window_controller.cpp b/src/core/hle/service/am/window_controller.cpp index f00957f83..c07ef228b 100644 --- a/src/core/hle/service/am/window_controller.cpp +++ b/src/core/hle/service/am/window_controller.cpp | |||
| @@ -62,12 +62,12 @@ void IWindowController::SetAppletWindowVisibility(HLERequestContext& ctx) { | |||
| 62 | applet->hid_registration.EnableAppletToGetInput(visible); | 62 | applet->hid_registration.EnableAppletToGetInput(visible); |
| 63 | 63 | ||
| 64 | if (visible) { | 64 | if (visible) { |
| 65 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground); | ||
| 66 | applet->focus_state = FocusState::InFocus; | 65 | applet->focus_state = FocusState::InFocus; |
| 66 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground); | ||
| 67 | } else { | 67 | } else { |
| 68 | applet->focus_state = FocusState::NotInFocus; | 68 | applet->focus_state = FocusState::NotInFocus; |
| 69 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoBackground); | ||
| 69 | } | 70 | } |
| 70 | applet->message_queue.PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged); | ||
| 71 | 71 | ||
| 72 | IPC::ResponseBuilder rb{ctx, 2}; | 72 | IPC::ResponseBuilder rb{ctx, 2}; |
| 73 | rb.Push(ResultSuccess); | 73 | rb.Push(ResultSuccess); |