Based on a patch by Myah Caron.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- Used by Forza Horizon 4.
configure.ac | 2 + .../api-ms-win-gaming-tcui-l1-1-0/Makefile.in | 1 + .../api-ms-win-gaming-tcui-l1-1-0.spec | 7 ++++ dlls/gamingtcui/Makefile.in | 6 +++ dlls/gamingtcui/gamingtcui.spec | 26 ++++++++++++ dlls/gamingtcui/gamingtcui_main.c | 41 +++++++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in create mode 100644 dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec create mode 100644 dlls/gamingtcui/Makefile.in create mode 100644 dlls/gamingtcui/gamingtcui.spec create mode 100644 dlls/gamingtcui/gamingtcui_main.c
diff --git a/configure.ac b/configure.ac index 46bbb8a70f8..b6e7b2e74f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2968,6 +2968,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-controller-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-legacy-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-provider-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventlog-legacy-l1-1-0) +WINE_CONFIG_MAKEFILE(dlls/api-ms-win-gaming-tcui-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-gdi-dpiinfo-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-mm-joystick-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-mm-misc-l1-1-1) @@ -3311,6 +3312,7 @@ WINE_CONFIG_MAKEFILE(dlls/fusion/tests) WINE_CONFIG_MAKEFILE(dlls/fwpuclnt) WINE_CONFIG_MAKEFILE(dlls/gameux) WINE_CONFIG_MAKEFILE(dlls/gameux/tests) +WINE_CONFIG_MAKEFILE(dlls/gamingtcui) WINE_CONFIG_MAKEFILE(dlls/gdi.exe16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/gdi32) WINE_CONFIG_MAKEFILE(dlls/gdi32/tests) diff --git a/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in b/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in new file mode 100644 index 00000000000..909e09b6301 --- /dev/null +++ b/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in @@ -0,0 +1 @@ +MODULE = api-ms-win-gaming-tcui-l1-1-0.dll 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 new file mode 100644 index 00000000000..586ff6069c9 --- /dev/null +++ b/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec @@ -0,0 +1,7 @@ +@ stub ProcessPendingGameUI +@ stub ShowChangeFriendRelationshipUI +@ stub ShowGameInviteUI +@ stub ShowPlayerPickerUI +@ stub ShowProfileCardUI +@ stub ShowTitleAchievementsUI +@ stub TryCancelPendingGameUI diff --git a/dlls/gamingtcui/Makefile.in b/dlls/gamingtcui/Makefile.in new file mode 100644 index 00000000000..cc89ce1fdb5 --- /dev/null +++ b/dlls/gamingtcui/Makefile.in @@ -0,0 +1,6 @@ +MODULE = gamingtcui.dll + +EXTRADLLFLAGS = -mno-cygwin + +C_SRCS = \ + gamingtcui_main.c diff --git a/dlls/gamingtcui/gamingtcui.spec b/dlls/gamingtcui/gamingtcui.spec new file mode 100644 index 00000000000..c455bbb7d54 --- /dev/null +++ b/dlls/gamingtcui/gamingtcui.spec @@ -0,0 +1,26 @@ +@ stub CheckGamingPrivilegeSilently +@ stub CheckGamingPrivilegeSilentlyForUser +@ stub CheckGamingPrivilegeWithUI +@ stub CheckGamingPrivilegeWithUIForUser +@ stub ProcessPendingGameUI +@ stub ShowChangeFriendRelationshipUI +@ stub ShowChangeFriendRelationshipUIForUser +@ stub ShowCustomizeUserProfileUI +@ stub ShowCustomizeUserProfileUIForUser +@ stub ShowFindFriendsUI +@ stub ShowFindFriendsUIForUser +@ stub ShowGameInfoUI +@ stub ShowGameInfoUIForUser +@ stub ShowGameInviteUI +@ stub ShowGameInviteUIForUser +@ stub ShowGameInviteUIWithContext +@ stub ShowGameInviteUIWithContextForUser +@ stub ShowPlayerPickerUI +@ stub ShowPlayerPickerUIForUser +@ stub ShowProfileCardUI +@ stub ShowProfileCardUIForUser +@ stub ShowTitleAchievementsUI +@ stub ShowTitleAchievementsUIForUser +@ stub ShowUserSettingsUI +@ stub ShowUserSettingsUIForUser +@ stub TryCancelPendingGameUI diff --git a/dlls/gamingtcui/gamingtcui_main.c b/dlls/gamingtcui/gamingtcui_main.c new file mode 100644 index 00000000000..0a9df713637 --- /dev/null +++ b/dlls/gamingtcui/gamingtcui_main.c @@ -0,0 +1,41 @@ +/* + * Copyright 2021 Paul Gofman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(gamingtcui); + +BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(%p, %d, %p)\n", hInstDll, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hInstDll); + break; + } + + return TRUE; +}
Based on a patch by Myah Caron.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- .../api-ms-win-gaming-tcui-l1-1-0.spec | 2 +- dlls/gamingtcui/gamingtcui.spec | 2 +- dlls/gamingtcui/gamingtcui_main.c | 8 +++++ include/gamingtcui.h | 35 +++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 include/gamingtcui.h
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 586ff6069c9..6b683a963c1 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,4 +1,4 @@ -@ stub ProcessPendingGameUI +@ stdcall ProcessPendingGameUI(long) gamingtcui.ProcessPendingGameUI @ stub ShowChangeFriendRelationshipUI @ stub ShowGameInviteUI @ stub ShowPlayerPickerUI diff --git a/dlls/gamingtcui/gamingtcui.spec b/dlls/gamingtcui/gamingtcui.spec index c455bbb7d54..893c58423e4 100644 --- a/dlls/gamingtcui/gamingtcui.spec +++ b/dlls/gamingtcui/gamingtcui.spec @@ -2,7 +2,7 @@ @ stub CheckGamingPrivilegeSilentlyForUser @ stub CheckGamingPrivilegeWithUI @ stub CheckGamingPrivilegeWithUIForUser -@ stub ProcessPendingGameUI +@ stdcall ProcessPendingGameUI(long) @ stub ShowChangeFriendRelationshipUI @ stub ShowChangeFriendRelationshipUIForUser @ stub ShowCustomizeUserProfileUI diff --git a/dlls/gamingtcui/gamingtcui_main.c b/dlls/gamingtcui/gamingtcui_main.c index 0a9df713637..1747495bfce 100644 --- a/dlls/gamingtcui/gamingtcui_main.c +++ b/dlls/gamingtcui/gamingtcui_main.c @@ -21,6 +21,7 @@
#include "windef.h" #include "winbase.h" +#include "gamingtcui.h"
#include "wine/debug.h"
@@ -39,3 +40,10 @@ BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved)
return TRUE; } + +HRESULT WINAPI ProcessPendingGameUI(BOOL wait_for_completion) +{ + FIXME("wait_for_completion %#x stub.\n", wait_for_completion); + + return S_OK; +} diff --git a/include/gamingtcui.h b/include/gamingtcui.h new file mode 100644 index 00000000000..cf55369d197 --- /dev/null +++ b/include/gamingtcui.h @@ -0,0 +1,35 @@ +/* + * Copyright 2021 Paul Gofman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#ifndef __WINE_GAMINGTCUI_H +#define __WINE_GAMINGTCUI_H + +#include <windows.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +HRESULT WINAPI ProcessPendingGameUI(BOOL wait_for_completion); + +#ifdef __cplusplus +} +#endif +#endif
Based on a patch by Myah Caron.
Signed-off-by: Paul Gofman pgofman@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 }
On 5/3/21 7:31 AM, Paul Gofman wrote:
Based on a patch by Myah Caron.
Signed-off-by: Paul Gofman pgofman@codeweavers.com
Used by Forza Horizon 4.
configure.ac | 2 + .../api-ms-win-gaming-tcui-l1-1-0/Makefile.in | 1 + .../api-ms-win-gaming-tcui-l1-1-0.spec | 7 ++++ dlls/gamingtcui/Makefile.in | 6 +++ dlls/gamingtcui/gamingtcui.spec | 26 ++++++++++++ dlls/gamingtcui/gamingtcui_main.c | 41 +++++++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in create mode 100644 dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec create mode 100644 dlls/gamingtcui/Makefile.in create mode 100644 dlls/gamingtcui/gamingtcui.spec create mode 100644 dlls/gamingtcui/gamingtcui_main.c
diff --git a/configure.ac b/configure.ac index 46bbb8a70f8..b6e7b2e74f0 100644 --- a/configure.ac +++ b/configure.ac @@ -2968,6 +2968,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-controller-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-legacy-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventing-provider-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-eventlog-legacy-l1-1-0) +WINE_CONFIG_MAKEFILE(dlls/api-ms-win-gaming-tcui-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-gdi-dpiinfo-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-mm-joystick-l1-1-0) WINE_CONFIG_MAKEFILE(dlls/api-ms-win-mm-misc-l1-1-1) @@ -3311,6 +3312,7 @@ WINE_CONFIG_MAKEFILE(dlls/fusion/tests) WINE_CONFIG_MAKEFILE(dlls/fwpuclnt) WINE_CONFIG_MAKEFILE(dlls/gameux) WINE_CONFIG_MAKEFILE(dlls/gameux/tests) +WINE_CONFIG_MAKEFILE(dlls/gamingtcui) WINE_CONFIG_MAKEFILE(dlls/gdi.exe16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/gdi32) WINE_CONFIG_MAKEFILE(dlls/gdi32/tests) diff --git a/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in b/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in new file mode 100644 index 00000000000..909e09b6301 --- /dev/null +++ b/dlls/api-ms-win-gaming-tcui-l1-1-0/Makefile.in @@ -0,0 +1 @@ +MODULE = api-ms-win-gaming-tcui-l1-1-0.dll 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 new file mode 100644 index 00000000000..586ff6069c9 --- /dev/null +++ b/dlls/api-ms-win-gaming-tcui-l1-1-0/api-ms-win-gaming-tcui-l1-1-0.spec @@ -0,0 +1,7 @@ +@ stub ProcessPendingGameUI +@ stub ShowChangeFriendRelationshipUI +@ stub ShowGameInviteUI +@ stub ShowPlayerPickerUI +@ stub ShowProfileCardUI +@ stub ShowTitleAchievementsUI +@ stub TryCancelPendingGameUI diff --git a/dlls/gamingtcui/Makefile.in b/dlls/gamingtcui/Makefile.in new file mode 100644 index 00000000000..cc89ce1fdb5 --- /dev/null +++ b/dlls/gamingtcui/Makefile.in @@ -0,0 +1,6 @@ +MODULE = gamingtcui.dll
+EXTRADLLFLAGS = -mno-cygwin
+C_SRCS = \
- gamingtcui_main.c
diff --git a/dlls/gamingtcui/gamingtcui.spec b/dlls/gamingtcui/gamingtcui.spec new file mode 100644 index 00000000000..c455bbb7d54 --- /dev/null +++ b/dlls/gamingtcui/gamingtcui.spec @@ -0,0 +1,26 @@ +@ stub CheckGamingPrivilegeSilently +@ stub CheckGamingPrivilegeSilentlyForUser +@ stub CheckGamingPrivilegeWithUI +@ stub CheckGamingPrivilegeWithUIForUser +@ stub ProcessPendingGameUI +@ stub ShowChangeFriendRelationshipUI +@ stub ShowChangeFriendRelationshipUIForUser +@ stub ShowCustomizeUserProfileUI +@ stub ShowCustomizeUserProfileUIForUser +@ stub ShowFindFriendsUI +@ stub ShowFindFriendsUIForUser +@ stub ShowGameInfoUI +@ stub ShowGameInfoUIForUser +@ stub ShowGameInviteUI +@ stub ShowGameInviteUIForUser +@ stub ShowGameInviteUIWithContext +@ stub ShowGameInviteUIWithContextForUser +@ stub ShowPlayerPickerUI +@ stub ShowPlayerPickerUIForUser +@ stub ShowProfileCardUI +@ stub ShowProfileCardUIForUser +@ stub ShowTitleAchievementsUI +@ stub ShowTitleAchievementsUIForUser +@ stub ShowUserSettingsUI +@ stub ShowUserSettingsUIForUser +@ stub TryCancelPendingGameUI diff --git a/dlls/gamingtcui/gamingtcui_main.c b/dlls/gamingtcui/gamingtcui_main.c new file mode 100644 index 00000000000..0a9df713637 --- /dev/null +++ b/dlls/gamingtcui/gamingtcui_main.c @@ -0,0 +1,41 @@ +/*
- Copyright 2021 Paul Gofman for CodeWeavers
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
+#include <stdarg.h>
+#include "windef.h" +#include "winbase.h"
+#include "wine/debug.h"
+WINE_DEFAULT_DEBUG_CHANNEL(gamingtcui);
+BOOL WINAPI DllMain(HINSTANCE hInstDll, DWORD fdwReason, LPVOID lpvReserved) +{
- TRACE("(%p, %d, %p)\n", hInstDll, fdwReason, lpvReserved);
- switch (fdwReason)
- {
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hInstDll);
break;
- }
- return TRUE;
+}
You don't need this (DllMain); winecrt0 provides the same implementation already.