[PATCH 3/4] gamingtcui: Add stub for ShowPlayerPickerUI().

Paul Gofman pgofman at codeweavers.com
Mon May 3 07:31:03 CDT 2021


Based on a patch by Myah Caron.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
---
 .../api-ms-win-gaming-tcui-l1-1-0.spec            |  2 +-
 dlls/gamingtcui/gamingtcui.spec                   |  2 +-
 dlls/gamingtcui/gamingtcui_main.c                 | 15 +++++++++++++++
 include/gamingtcui.h                              |  7 +++++++
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec b/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec
index 6b683a963c1..b019595c502 100644
--- a/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec
+++ b/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec
@@ -1,7 +1,7 @@
 @ stdcall ProcessPendingGameUI(long) gamingtcui.ProcessPendingGameUI
 @ stub ShowChangeFriendRelationshipUI
 @ stub ShowGameInviteUI
-@ stub ShowPlayerPickerUI
+@ stdcall ShowPlayerPickerUI(ptr ptr long ptr long long long ptr ptr) gamingtcui.ShowPlayerPickerUI
 @ stub ShowProfileCardUI
 @ stub ShowTitleAchievementsUI
 @ stub TryCancelPendingGameUI
diff --git a/dlls/gamingtcui/gamingtcui.spec b/dlls/gamingtcui/gamingtcui.spec
index 893c58423e4..32c8496f657 100644
--- a/dlls/gamingtcui/gamingtcui.spec
+++ b/dlls/gamingtcui/gamingtcui.spec
@@ -15,7 +15,7 @@
 @ stub ShowGameInviteUIForUser
 @ stub ShowGameInviteUIWithContext
 @ stub ShowGameInviteUIWithContextForUser
-@ stub ShowPlayerPickerUI
+@ stdcall ShowPlayerPickerUI(ptr ptr long ptr long long long ptr ptr)
 @ stub ShowPlayerPickerUIForUser
 @ stub ShowProfileCardUI
 @ stub ShowProfileCardUIForUser
diff --git a/dlls/gamingtcui/gamingtcui_main.c b/dlls/gamingtcui/gamingtcui_main.c
index 1747495bfce..9d00a43ae15 100644
--- a/dlls/gamingtcui/gamingtcui_main.c
+++ b/dlls/gamingtcui/gamingtcui_main.c
@@ -47,3 +47,18 @@ HRESULT WINAPI ProcessPendingGameUI(BOOL wait_for_completion)
 
     return S_OK;
 }
+
+HRESULT WINAPI ShowPlayerPickerUI(HSTRING prompt_display_text, const HSTRING *xuids, size_t xuid_count,
+        const HSTRING *preselected_xuids, size_t preselected_xuid_count, size_t min_selection_count,
+        size_t max_selection_count, PlayerPickerUICompletionRoutine completion_routine, void *context)
+{
+    FIXME("prompt_display_text %p, xuids %p, xuid_count %lu, preselected_xuids %p, preselected_xuid_count %lu,"
+            " min_selection_count %lu, max_selection_count %lu, completion_routine %p, context %p semi-stub.\n",
+            prompt_display_text, xuids, (SIZE_T)xuid_count, preselected_xuids, (SIZE_T)preselected_xuid_count,
+            (SIZE_T)min_selection_count, (SIZE_T)max_selection_count, completion_routine, context);
+
+    if (completion_routine)
+        completion_routine(S_OK, context, preselected_xuids, preselected_xuid_count);
+
+    return S_OK;
+}
diff --git a/include/gamingtcui.h b/include/gamingtcui.h
index cf55369d197..99e8d85b2e8 100644
--- a/include/gamingtcui.h
+++ b/include/gamingtcui.h
@@ -21,13 +21,20 @@
 #define __WINE_GAMINGTCUI_H
 
 #include <windows.h>
+#include <hstring.h>
 
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
+typedef void (WINAPI *PlayerPickerUICompletionRoutine)(HRESULT return_code, void *context,
+        const HSTRING *selected_xuids, size_t count);
+
 HRESULT WINAPI ProcessPendingGameUI(BOOL wait_for_completion);
+HRESULT WINAPI ShowPlayerPickerUI(HSTRING prompt_display_text, const HSTRING *xuids, size_t xuid_count,
+        const HSTRING *preselected_xuids, size_t preselected_xuid_count, size_t min_selection_count,
+        size_t max_selection_count, PlayerPickerUICompletionRoutine completion_routine, void *context);
 
 #ifdef __cplusplus
 }
-- 
2.31.1




More information about the wine-devel mailing list