diff --git a/code/client/launcher/BackdropBrush.winmd b/code/client/launcher/BackdropBrush.winmd index 0f44f3dc71..b7e2cfc8ef 100644 Binary files a/code/client/launcher/BackdropBrush.winmd and b/code/client/launcher/BackdropBrush.winmd differ diff --git a/code/client/launcher/CitiLaunch/BackdropBrush.g.h b/code/client/launcher/CitiLaunch/BackdropBrush.g.h index 510b837f53..472ad7967b 100644 --- a/code/client/launcher/CitiLaunch/BackdropBrush.g.h +++ b/code/client/launcher/CitiLaunch/BackdropBrush.g.h @@ -1,4 +1,4 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 #pragma once #include "winrt/CitiLaunch.h" @@ -8,30 +8,33 @@ namespace winrt::CitiLaunch::implementation { template - struct __declspec(empty_bases) BackdropBrush_base : implements, - impl::require, - impl::base, - Windows::UI::Xaml::Media::IXamlCompositionBrushBaseOverridesT, Windows::UI::Xaml::Media::IBrushOverrides2T + struct WINRT_IMPL_EMPTY_BASES BackdropBrush_base : implements, + impl::require, + protected impl::require, + impl::base, + winrt::Windows::UI::Xaml::Media::IXamlCompositionBrushBaseOverridesT, winrt::Windows::UI::Xaml::Media::IBrushOverrides2T { using base_type = BackdropBrush_base; using class_type = CitiLaunch::BackdropBrush; using implements_type = typename BackdropBrush_base::implements_type; using implements_type::implements_type; - using composable_base = Windows::UI::Xaml::Media::XamlCompositionBrushBase; + using composable_base = winrt::Windows::UI::Xaml::Media::XamlCompositionBrushBase; + friend impl::consume_t; + friend impl::require_one; hstring GetRuntimeClassName() const { return L"CitiLaunch.BackdropBrush"; } BackdropBrush_base() { - impl::call_factory([&](Windows::UI::Xaml::Media::IXamlCompositionBrushBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); + impl::call_factory([&](winrt::Windows::UI::Xaml::Media::IXamlCompositionBrushBaseFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } }; } namespace winrt::CitiLaunch::factory_implementation { template - struct __declspec(empty_bases) BackdropBrushT : implements + struct WINRT_IMPL_EMPTY_BASES BackdropBrushT : implements { using instance_type = CitiLaunch::BackdropBrush; @@ -47,7 +50,9 @@ namespace winrt::CitiLaunch::factory_implementation } #if defined(WINRT_FORCE_INCLUDE_BACKDROPBRUSH_XAML_G_H) || __has_include("CitiLaunch/BackdropBrush.xaml.g.h") + #include "CitiLaunch/BackdropBrush.xaml.g.h" + #else namespace winrt::CitiLaunch::implementation diff --git a/code/client/launcher/build_winmd.cmd b/code/client/launcher/build_winmd.cmd index 1d0c4b3cee..2196eb3f6b 100644 --- a/code/client/launcher/build_winmd.cmd +++ b/code/client/launcher/build_winmd.cmd @@ -1,5 +1,5 @@ @echo off -midl /winrt /metadata_dir "%WindowsSdkDir%References\10.0.22000.0\windows.foundation.foundationcontract\4.0.0.0" /h "nul" /nomidl /reference "%WindowsSdkDir%References\10.0.22000.0\Windows.Foundation.FoundationContract\4.0.0.0\Windows.Foundation.FoundationContract.winmd" /reference "%WindowsSdkDir%References\10.0.22000.0\Windows.Foundation.UniversalApiContract\13.0.0.0\Windows.Foundation.UniversalApiContract.winmd" BackdropBrush.idl +midl /winrt /metadata_dir "%WindowsSdkDir%References\10.0.26100.0\windows.foundation.foundationcontract\4.0.0.0" /h "nul" /nomidl /reference "%WindowsSdkDir%References\10.0.26100.0\Windows.Foundation.FoundationContract\4.0.0.0\Windows.Foundation.FoundationContract.winmd" /reference "%WindowsSdkDir%References\10.0.26100.0\Windows.Foundation.UniversalApiContract\19.0.0.0\Windows.Foundation.UniversalApiContract.winmd" BackdropBrush.idl cppwinrt -in BackdropBrush.winmd -c -r sdk -o . diff --git a/code/client/launcher/winrt/CitiLaunch.h b/code/client/launcher/winrt/CitiLaunch.h index 2bb37e4b9d..85457f4749 100644 --- a/code/client/launcher/winrt/CitiLaunch.h +++ b/code/client/launcher/winrt/CitiLaunch.h @@ -1,10 +1,11 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_CitiLaunch_H #define WINRT_CitiLaunch_H #include "winrt/base.h" -static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.201201.7"), "Mismatched C++/WinRT headers."); -#define CPPWINRT_VERSION "2.0.201201.7" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); +#define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Windows.UI.Composition.2.h" #include "winrt/impl/Windows.UI.Xaml.2.h" #include "winrt/impl/Windows.UI.Xaml.Media.2.h" @@ -12,14 +13,14 @@ static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.201201.7"), "Mismatche namespace winrt::impl { template - struct produce : produce_base + struct produce : produce_base { }; } WINRT_EXPORT namespace winrt::CitiLaunch { inline BackdropBrush::BackdropBrush() : - BackdropBrush(impl::call_factory_cast([](Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) + BackdropBrush(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } @@ -29,5 +30,7 @@ namespace std template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif +#ifdef __cpp_lib_format +#endif } #endif diff --git a/code/client/launcher/winrt/Microsoft.Graphics.Canvas.Effects.h b/code/client/launcher/winrt/Microsoft.Graphics.Canvas.Effects.h index 1b081d8f61..a958181ca6 100644 --- a/code/client/launcher/winrt/Microsoft.Graphics.Canvas.Effects.h +++ b/code/client/launcher/winrt/Microsoft.Graphics.Canvas.Effects.h @@ -1,10 +1,11 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_Microsoft_Graphics_Canvas_Effects_H #define WINRT_Microsoft_Graphics_Canvas_Effects_H #include "winrt/base.h" -static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.201201.7"), "Mismatched C++/WinRT headers."); -#define CPPWINRT_VERSION "2.0.201201.7" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); +#define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/impl/Microsoft.Graphics.Canvas.Effects.2.h" namespace winrt::impl { @@ -16,5 +17,7 @@ namespace std { #ifndef WINRT_LEAN_AND_MEAN #endif +#ifdef __cpp_lib_format +#endif } #endif diff --git a/code/client/launcher/winrt/fast_forward.h b/code/client/launcher/winrt/fast_forward.h index 4d22b3f122..ac324e82a4 100644 --- a/code/client/launcher/winrt/fast_forward.h +++ b/code/client/launcher/winrt/fast_forward.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_FAST_FORWARD_H #define WINRT_FAST_FORWARD_H #include @@ -8,6 +9,12 @@ #define WINRT_IMPL_STRING_1(expression) #expression #define WINRT_IMPL_STRING(expression) WINRT_IMPL_STRING_1(expression) +#if defined(_MSC_VER) +#define WINRT_IMPL_FF_NOVTABLE __declspec(novtable) +#else +#define WINRT_IMPL_FF_NOVTABLE +#endif + #if !defined(WINRT_FAST_ABI_SIZE) #define WINRT_FAST_ABI_SIZE 0 #endif @@ -1052,7 +1059,7 @@ namespace winrt::impl } }; - struct __declspec(novtable) inspectable + struct WINRT_IMPL_FF_NOVTABLE inspectable { virtual int32_t __stdcall QueryInterface(guid const& id, void** object) noexcept = 0; virtual uint32_t __stdcall AddRef() noexcept = 0; @@ -5224,4 +5231,5 @@ namespace winrt #undef WINRT_IMPL_STRING #undef WINRT_IMPL_STRING_1 +#undef WINRT_IMPL_FF_NOVTABLE #endif diff --git a/code/client/launcher/winrt/impl/CitiLaunch.0.h b/code/client/launcher/winrt/impl/CitiLaunch.0.h index ec5c87f8f0..96b8e792b9 100644 --- a/code/client/launcher/winrt/impl/CitiLaunch.0.h +++ b/code/client/launcher/winrt/impl/CitiLaunch.0.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_CitiLaunch_0_H #define WINRT_CitiLaunch_0_H WINRT_EXPORT namespace winrt::CitiLaunch @@ -9,15 +10,15 @@ WINRT_EXPORT namespace winrt::CitiLaunch } namespace winrt::impl { - template <> struct category{ using type = interface_category; }; - template <> struct category{ using type = class_category; }; - template <> inline constexpr auto& name_v = L"CitiLaunch.BackdropBrush"; - template <> inline constexpr auto& name_v = L"CitiLaunch.IBackdropBrush"; - template <> inline constexpr guid guid_v{ 0xB3CC91C9,0xD1CB,0x5350,{ 0xBC,0x5C,0xA0,0x76,0xF5,0xC5,0x0B,0xF7 } }; // B3CC91C9-D1CB-5350-BC5C-A076F5C50BF7 - template <> struct default_interface{ using type = CitiLaunch::IBackdropBrush; }; - template <> struct abi + template <> struct category{ using type = interface_category; }; + template <> struct category{ using type = class_category; }; + template <> inline constexpr auto& name_v = L"CitiLaunch.BackdropBrush"; + template <> inline constexpr auto& name_v = L"CitiLaunch.IBackdropBrush"; + template <> inline constexpr guid guid_v{ 0xB3CC91C9,0xD1CB,0x5350,{ 0xBC,0x5C,0xA0,0x76,0xF5,0xC5,0x0B,0xF7 } }; // B3CC91C9-D1CB-5350-BC5C-A076F5C50BF7 + template <> struct default_interface{ using type = winrt::CitiLaunch::IBackdropBrush; }; + template <> struct abi { - struct __declspec(novtable) type : inspectable_abi + struct WINRT_IMPL_NOVTABLE type : inspectable_abi { }; }; @@ -25,7 +26,7 @@ namespace winrt::impl struct consume_CitiLaunch_IBackdropBrush { }; - template <> struct consume + template <> struct consume { template using type = consume_CitiLaunch_IBackdropBrush; }; diff --git a/code/client/launcher/winrt/impl/CitiLaunch.1.h b/code/client/launcher/winrt/impl/CitiLaunch.1.h index 9a03981846..2b181d3ecd 100644 --- a/code/client/launcher/winrt/impl/CitiLaunch.1.h +++ b/code/client/launcher/winrt/impl/CitiLaunch.1.h @@ -1,16 +1,17 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_CitiLaunch_1_H #define WINRT_CitiLaunch_1_H #include "winrt/impl/CitiLaunch.0.h" WINRT_EXPORT namespace winrt::CitiLaunch { - struct __declspec(empty_bases) IBackdropBrush : - Windows::Foundation::IInspectable, + struct WINRT_IMPL_EMPTY_BASES IBackdropBrush : + winrt::Windows::Foundation::IInspectable, impl::consume_t { IBackdropBrush(std::nullptr_t = nullptr) noexcept {} - IBackdropBrush(void* ptr, take_ownership_from_abi_t) noexcept : Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} + IBackdropBrush(void* ptr, take_ownership_from_abi_t) noexcept : winrt::Windows::Foundation::IInspectable(ptr, take_ownership_from_abi) {} }; } #endif diff --git a/code/client/launcher/winrt/impl/CitiLaunch.2.h b/code/client/launcher/winrt/impl/CitiLaunch.2.h index 94a9b4dd1f..80171622e9 100644 --- a/code/client/launcher/winrt/impl/CitiLaunch.2.h +++ b/code/client/launcher/winrt/impl/CitiLaunch.2.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_CitiLaunch_2_H #define WINRT_CitiLaunch_2_H #include "winrt/impl/Windows.UI.Composition.1.h" @@ -8,12 +9,12 @@ #include "winrt/impl/CitiLaunch.1.h" WINRT_EXPORT namespace winrt::CitiLaunch { - struct __declspec(empty_bases) BackdropBrush : CitiLaunch::IBackdropBrush, - impl::base, - impl::require + struct WINRT_IMPL_EMPTY_BASES BackdropBrush : winrt::CitiLaunch::IBackdropBrush, + impl::base, + impl::require { BackdropBrush(std::nullptr_t) noexcept {} - BackdropBrush(void* ptr, take_ownership_from_abi_t) noexcept : CitiLaunch::IBackdropBrush(ptr, take_ownership_from_abi) {} + BackdropBrush(void* ptr, take_ownership_from_abi_t) noexcept : winrt::CitiLaunch::IBackdropBrush(ptr, take_ownership_from_abi) {} BackdropBrush(); }; } diff --git a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.0.h b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.0.h index 011d74c527..6a00214c4a 100644 --- a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.0.h +++ b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.0.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_Microsoft_Graphics_Canvas_Effects_0_H #define WINRT_Microsoft_Graphics_Canvas_Effects_0_H WINRT_EXPORT namespace winrt::Microsoft::Graphics::Canvas::Effects @@ -8,8 +9,8 @@ WINRT_EXPORT namespace winrt::Microsoft::Graphics::Canvas::Effects } namespace winrt::impl { - template <> struct category{ using type = struct_category; }; - template <> inline constexpr auto& name_v = L"Microsoft.Graphics.Canvas.Effects.Matrix5x4"; + template <> struct category{ using type = struct_category; }; + template <> inline constexpr auto& name_v = L"Microsoft.Graphics.Canvas.Effects.Matrix5x4"; struct struct_Microsoft_Graphics_Canvas_Effects_Matrix5x4 { float M11; diff --git a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.1.h b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.1.h index e4c50010b8..3189d8bf2f 100644 --- a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.1.h +++ b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.1.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_Microsoft_Graphics_Canvas_Effects_1_H #define WINRT_Microsoft_Graphics_Canvas_Effects_1_H #include "winrt/impl/Microsoft.Graphics.Canvas.Effects.0.h" diff --git a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.2.h b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.2.h index 064fea509f..772bf549d8 100644 --- a/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.2.h +++ b/code/client/launcher/winrt/impl/Microsoft.Graphics.Canvas.Effects.2.h @@ -1,5 +1,6 @@ -// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.201201.7 +// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1 +#pragma once #ifndef WINRT_Microsoft_Graphics_Canvas_Effects_2_H #define WINRT_Microsoft_Graphics_Canvas_Effects_2_H #include "winrt/impl/Microsoft.Graphics.Canvas.Effects.1.h" @@ -7,26 +8,26 @@ WINRT_EXPORT namespace winrt::Microsoft::Graphics::Canvas::Effects { struct Matrix5x4 { - float M11; - float M12; - float M13; - float M14; - float M21; - float M22; - float M23; - float M24; - float M31; - float M32; - float M33; - float M34; - float M41; - float M42; - float M43; - float M44; - float M51; - float M52; - float M53; - float M54; + float M11 {}; + float M12 {}; + float M13 {}; + float M14 {}; + float M21 {}; + float M22 {}; + float M23 {}; + float M24 {}; + float M31 {}; + float M32 {}; + float M33 {}; + float M34 {}; + float M41 {}; + float M42 {}; + float M43 {}; + float M44 {}; + float M51 {}; + float M52 {}; + float M53 {}; + float M54 {}; }; inline bool operator==(Matrix5x4 const& left, Matrix5x4 const& right) noexcept { diff --git a/code/client/shared/CfxLegitimacyAPI.h b/code/client/shared/CfxLegitimacyAPI.h new file mode 100644 index 0000000000..c85ca2a601 --- /dev/null +++ b/code/client/shared/CfxLegitimacyAPI.h @@ -0,0 +1,44 @@ +#pragma once + +#include +#include + +#if defined(_WIN32) +#if defined(COMPILING_CFX_LEGITIMACY) +#define CFX_API __declspec(dllexport) +#else +#define CFX_API __declspec(dllimport) +#endif +#define CFX_CALL __stdcall +#else +#define CFX_API +#define CFX_CALL +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void(CFX_CALL* cfx_auth_callback)(bool success, const char* data, size_t data_length); +typedef void(CFX_CALL* cfx_steam_ticket_callback)(const char* ticket, size_t ticket_len, const char* response, size_t response_len, void* user_data); + +CFX_API void CFX_CALL cfx_discord_authenticate(const char* user_id, const char* code, cfx_auth_callback callback); +CFX_API void CFX_CALL cfx_discourse_authenticate(const char* client_id, const char* auth_token, cfx_auth_callback callback); + +CFX_API bool CFX_CALL cfx_should_process_headers(const char* hostname); +CFX_API void CFX_CALL cfx_process_headers(char*, char*); + +CFX_API void CFX_CALL cfx_steam_init(void); +CFX_API bool CFX_CALL cfx_steam_is_running(void); +CFX_API bool CFX_CALL cfx_steam_is_initialized(void); +CFX_API void CFX_CALL cfx_steam_get_auth_ticket(cfx_steam_ticket_callback callback, bool enforce_auth, void* user_data); +CFX_API uint64_t CFX_CALL cfx_steam_get_id(void); +CFX_API const char* CFX_CALL cfx_steam_get_username(void); +CFX_API void CFX_CALL cfx_steam_set_rich_presence(const char* key, const char* value); +CFX_API void CFX_CALL cfx_steam_reset_rich_presence(void); +CFX_API bool CFX_CALL cfx_steam_set_app_id(int legacy); +CFX_API void CFX_CALL cfx_steam_wait_for_app_switch(void); + +#ifdef __cplusplus +} +#endif diff --git a/code/client/shared/SharedLegitimacyAPI.cpp b/code/client/shared/SharedLegitimacyAPI.cpp new file mode 100644 index 0000000000..e57db61193 --- /dev/null +++ b/code/client/shared/SharedLegitimacyAPI.cpp @@ -0,0 +1,97 @@ +#include "SharedLegitimacyAPI.h" +#include "CfxLegitimacyAPI.h" + +namespace cfx::legitimacy +{ +void AuthenticateDiscord(const char* userId, const char* code, AuthCallback callback) +{ + return cfx_discord_authenticate(userId, code, callback); +} +void AuthenticateDiscourse(const char* clientId, const char* authToken, AuthCallback callback) +{ + return cfx_discourse_authenticate(clientId, authToken, callback); +} + +bool ShouldProcessHeaders(const char* hostname) +{ + return cfx_should_process_headers(hostname); +} + +void ProcessHeaders(char* key, char* value) +{ + return cfx_process_headers(key, value); +} + +void InitSteamSDKConnection() +{ + return cfx_steam_init(); +} + +bool IsSteamRunning() +{ + return cfx_steam_is_running(); +} + +bool IsSteamInitializedWrapper() +{ + return cfx_steam_is_initialized(); +} + +void GetSteamAuthTicketWrapper(const SteamAuthTicketCallback& callback, bool enforceSteamAuth) +{ + auto* fn = new SteamAuthTicketCallback(callback); + cfx_steam_get_auth_ticket([](const char* ticket, size_t ticket_len, const char* response, size_t response_len, void* user_data) + { + auto cb = static_cast(user_data); + std::string ticketStr; + if (ticket && ticket_len > 0) + { + ticketStr.assign(ticket, ticket_len); + } + std::string responseStr; + if (response && response_len > 0) + { + responseStr.assign(response, response_len); + } + (*cb)(std::make_pair(responseStr, ticketStr)); + delete cb; + }, + enforceSteamAuth, fn); +} + +uint64_t GetSteamIdAsIntWrapper() +{ + return cfx_steam_get_id(); +} + +std::string GetSteamUsernameWrapper() +{ + std::string result; + const char* username = cfx_steam_get_username(); + if (username) + { + result = std::string(username); + } + return result; +} + +void SetSteamRichPresenceWrapper(std::string key, std::string value) +{ + return cfx_steam_set_rich_presence(key.c_str(), value.c_str()); +} + +void ResetSteamRichPresenceWrapper() +{ + return cfx_steam_reset_rich_presence(); +} + +bool SetSteamAppId(bool legacy) +{ + return cfx_steam_set_app_id(legacy); +} + +void WaitForAppSwitchWrapper() +{ + return cfx_steam_wait_for_app_switch(); +} +} diff --git a/code/client/shared/SharedLegitimacyAPI.h b/code/client/shared/SharedLegitimacyAPI.h index 0faa4abce6..d96c5643d4 100644 --- a/code/client/shared/SharedLegitimacyAPI.h +++ b/code/client/shared/SharedLegitimacyAPI.h @@ -9,22 +9,22 @@ namespace cfx::legitimacy { using AuthCallback = void(bool success, const char* data, size_t length); -using ProcessHeadersCallback = void(const char*, const char*); +using SteamAuthTicketCallback = std::function)>; -void DLL_IMPORT AuthenticateDiscord(const char* userId, const char* code, AuthCallback callback); -void DLL_IMPORT AuthenticateDiscourse(const char* clientId, const char* authToken, AuthCallback callback); +void AuthenticateDiscord(const char* userId, const char* code, AuthCallback callback); +void AuthenticateDiscourse(const char* clientId, const char* authToken, AuthCallback callback); -bool DLL_IMPORT ShouldProcessHeaders(const char* hostname); -void DLL_IMPORT ProcessHeaders(char*, char*); +bool ShouldProcessHeaders(const char* hostname); +void ProcessHeaders(char* key, char* value); -void DLL_IMPORT InitSteamSDKConnection(); -bool DLL_IMPORT IsSteamRunning(); -bool DLL_IMPORT IsSteamInitializedWrapper(); -void DLL_IMPORT GetSteamAuthTicketWrapper(const std::function)>& callback, bool enforceSteamAuth); -uint64_t DLL_IMPORT GetSteamIdAsIntWrapper(); -std::string DLL_IMPORT GetSteamUsernameWrapper(); -void DLL_IMPORT SetSteamRichPresenceWrapper(std::string key, std::string value); -void DLL_IMPORT ResetSteamRichPresenceWrapper(); -bool DLL_IMPORT SetSteamAppId(bool legacy); -void DLL_IMPORT WaitForAppSwitchWrapper(); +void InitSteamSDKConnection(); +bool IsSteamRunning(); +bool IsSteamInitializedWrapper(); +void GetSteamAuthTicketWrapper(const SteamAuthTicketCallback& callback, bool enforceSteamAuth); +uint64_t GetSteamIdAsIntWrapper(); +std::string GetSteamUsernameWrapper(); +void SetSteamRichPresenceWrapper(std::string key, std::string value); +void ResetSteamRichPresenceWrapper(); +bool SetSteamAppId(bool legacy); +void WaitForAppSwitchWrapper(); } diff --git a/code/premake5.lua b/code/premake5.lua index 14c9cc9142..a7d238ff79 100644 --- a/code/premake5.lua +++ b/code/premake5.lua @@ -176,7 +176,7 @@ workspace "CitizenMP" buildoptions { '/Zc:preprocessor' } - systemversion '10.0.22000.0' + systemversion '10.0.26100.0' else vectorextensions 'SSSE3' end diff --git a/docs/building.md b/docs/building.md index fd432846e7..b6fb0f92fa 100644 --- a/docs/building.md +++ b/docs/building.md @@ -11,7 +11,7 @@ To build FiveM, RedM or FXServer on Windows you need the following dependencies: - Windows application development - Individual components - .NET Framework 4.6 targeting pack - - Windows 11 SDK (10.0.22000.0) + - Windows 11 SDK (10.0.26100.0) You can install these workloads by going to "Tools" -> "Get Tools and Features..." -> Check the checkboxes -> Click "Modify" in the bottom right corner.