mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 02:18:35 +00:00
Allow to differentiate platforms
This commit is contained in:
parent
a019747b42
commit
2b10550fc3
@ -73,12 +73,22 @@ SMCResult SignatureGameConfig::ReadSMC_NewSection(const SMCStates *states, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle platform specific sections first.
|
// Handle platform specific sections first.
|
||||||
|
#ifdef DYNAMICHOOKS_x86_64
|
||||||
|
#if defined WIN32
|
||||||
|
if (!strcmp(name, "windows64"))
|
||||||
|
#elif defined _LINUX
|
||||||
|
if (!strcmp(name, "linux64"))
|
||||||
|
#elif defined _OSX
|
||||||
|
if (!strcmp(name, "mac64"))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#if defined WIN32
|
#if defined WIN32
|
||||||
if (!strcmp(name, "windows"))
|
if (!strcmp(name, "windows"))
|
||||||
#elif defined _LINUX
|
#elif defined _LINUX
|
||||||
if (!strcmp(name, "linux"))
|
if (!strcmp(name, "linux"))
|
||||||
#elif defined _OSX
|
#elif defined _OSX
|
||||||
if (!strcmp(name, "mac"))
|
if (!strcmp(name, "mac"))
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// We're already in a section for a different OS that we're ignoring. Can't have a section for our OS in here.
|
// We're already in a section for a different OS that we're ignoring. Can't have a section for our OS in here.
|
||||||
@ -99,13 +109,8 @@ SMCResult SignatureGameConfig::ReadSMC_NewSection(const SMCStates *states, const
|
|||||||
g_PlatformOnlyState = g_ParseState;
|
g_PlatformOnlyState = g_ParseState;
|
||||||
return SMCResult_Continue;
|
return SMCResult_Continue;
|
||||||
}
|
}
|
||||||
#if defined WIN32
|
else if (!strcmp(name, "windows") || !strcmp(name, "linux") || !strcmp(name, "mac")
|
||||||
else if (!strcmp(name, "linux") || !strcmp(name, "mac"))
|
|| !strcmp(name, "windows64") || !strcmp(name, "linux64") || !strcmp(name, "mac64"))
|
||||||
#elif defined _LINUX
|
|
||||||
else if (!strcmp(name, "windows") || !strcmp(name, "mac"))
|
|
||||||
#elif defined _OSX
|
|
||||||
else if (!strcmp(name, "windows") || !strcmp(name, "linux"))
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (g_PlatformOnlyState != PState_None)
|
if (g_PlatformOnlyState != PState_None)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user