Merge pull request #1377 from siliceum/fix/non-desktop-win32

Fix non desktop win32 build
This commit is contained in:
Bartosz Taudul
2026-05-29 17:55:11 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -10,7 +10,9 @@
# include <inttypes.h>
# include <intrin.h>
# include "../common/TracyWinFamily.hpp"
# ifndef _MSC_VER
# if defined(_MSC_VER) // https://devblogs.microsoft.com/oldnewthing/20200730-00/?p=104021/
# define fileno _fileno
# else
# include <excpt.h>
# endif
#else

View File

@@ -374,9 +374,11 @@ TRACY_API const char* GetUserFullName()
#if defined TRACY_HAS_CUSTOM_USER_INFO
return PlatformGetUserFullName();
#elif defined _WIN32
# if !defined TRACY_WIN32_NO_DESKTOP
static char buf[1024];
ULONG size = sizeof( buf );
if( GetUserNameExA( NameDisplay, buf, &size ) ) return buf;
# endif
return nullptr;
#elif defined __ANDROID__
const auto passwd = getpwuid( getuid() );