[Kernel] - further adjustments to xam overlapped ui for storage selection and messages

This commit is contained in:
Cancerous 2019-12-19 17:33:34 -05:00
parent dd8653a05a
commit 8d33d26d59
1 changed files with 6 additions and 4 deletions

View File

@ -386,7 +386,7 @@ dword_result_t XamShowDeviceSelectorUI(dword_t user_index, dword_t content_type,
kernel_state()->BroadcastNotification(0x9, true);
auto ui_fn = [content_type, device_id_ptr, overlapped]() {
XELOGI("XamShowDeviceSelectorUI Content_type:(%X) device_id_ptr: %.8X overlapped:(%X)",
XELOGW("XamShowDeviceSelectorUI Content_type:(%X) device_id_ptr: %.8X overlapped:(%X)",
content_type, device_id_ptr, (bool)overlapped);
// NOTE: 0xF00D0000 magic from xam_content.cc
@ -401,17 +401,19 @@ dword_result_t XamShowDeviceSelectorUI(dword_t user_index, dword_t content_type,
*device_id_ptr = 0xF00D0000 | 0x0003;
break;
default:
XELOGW("XamShowDeviceSelectorUI Unhandled Content_type:(%X)", content_type);
assert_unhandled_case(content_type);
*device_id_ptr = 0xF00D0000 | 0x0001;
break;
}
xe::threading::Sleep(std::chrono::milliseconds(500));
if (overlapped) {
kernel_state()->CompleteOverlappedImmediate(overlapped, X_ERROR_SUCCESS);
}
// Sleep for 1 second, act like user is making a choice
xe::threading::Sleep(std::chrono::milliseconds(500));
xe::threading::Sleep(std::chrono::milliseconds(100));
// Broadcast XN_SYS_UI = true followed by XN_SYS_UI = false
kernel_state()->BroadcastNotification(0x9, true);
@ -428,7 +430,7 @@ dword_result_t XamShowDeviceSelectorUI(dword_t user_index, dword_t content_type,
ui_thread->set_name("XamShowDeviceSelectorUI Thread");
ui_thread->Create();
while (ui_thread->last_error() != X_ERROR_SUCCESS) {
xe::threading::Sleep(std::chrono::milliseconds(101));
xe::threading::Sleep(std::chrono::milliseconds(110));
}
return X_ERROR_IO_PENDING;
} else {