[PATCH 1/4] gamingtcui: Add dll.

Zebediah Figura (she/her) zfigura at codeweavers.com
Mon May 3 10:59:20 CDT 2021



On 5/3/21 7:31 AM, Paul Gofman wrote:
> Based on a patch by Myah Caron.
> 
> Signed-off-by: Paul Gofman <pgofman at 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.



More information about the wine-devel mailing list