mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-10 13:28:15 +00:00
Define SDL_PLATFORM_* macros instead of underscored ones (#8875)
This commit is contained in:

committed by
GitHub

parent
ceccf24519
commit
31d133db40
@@ -54,15 +54,15 @@ static FcitxClient fcitx_client;
|
||||
|
||||
static char *GetAppName(void)
|
||||
{
|
||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||
#if defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_FREEBSD)
|
||||
char *spot;
|
||||
char procfile[1024];
|
||||
char linkfile[1024];
|
||||
int linksize;
|
||||
|
||||
#ifdef __LINUX__
|
||||
#ifdef SDL_PLATFORM_LINUX
|
||||
(void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/exe", getpid());
|
||||
#elif defined(__FREEBSD__)
|
||||
#elif defined(SDL_PLATFORM_FREEBSD)
|
||||
(void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/file", getpid());
|
||||
#endif
|
||||
linksize = readlink(procfile, linkfile, sizeof(linkfile) - 1);
|
||||
@@ -75,7 +75,7 @@ static char *GetAppName(void)
|
||||
return SDL_strdup(linkfile);
|
||||
}
|
||||
}
|
||||
#endif /* __LINUX__ || __FREEBSD__ */
|
||||
#endif /* SDL_PLATFORM_LINUX || SDL_PLATFORM_FREEBSD */
|
||||
|
||||
return SDL_strdup("SDL_App");
|
||||
}
|
||||
|
Reference in New Issue
Block a user