platform.h cleanup

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-06 15:10:21 -07:00
parent 9a8a411a0b
commit d6744690ee
34 changed files with 145 additions and 777 deletions
-41
View File
@@ -1127,20 +1127,6 @@ void CrySleep(unsigned int dwMilliseconds)
Sleep(dwMilliseconds);
}
//////////////////////////////////////////////////////////////////////////
void CryLowLatencySleep(unsigned int dwMilliseconds)
{
#if defined(AZ_RESTRICTED_PLATFORM)
#define AZ_RESTRICTED_SECTION WINBASE_CPP_SECTION_6
#include AZ_RESTRICTED_FILE(WinBase_cpp)
#endif
#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
#else
CrySleep(dwMilliseconds);
#endif
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
int CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType)
@@ -1284,14 +1270,6 @@ int CryMessageBox(const char* lpText, const char* lpCaption, unsigned int uType)
#endif
}
//////////////////////////////////////////////////////////////////////////
short CryGetAsyncKeyState(int vKey)
{
//TODO: implement
CRY_ASSERT_MESSAGE(0, "CryGetAsyncKeyState not implemented yet");
return 0;
}
#if defined(LINUX) || defined(APPLE) || defined(DEFINE_CRY_INTERLOCKED_INCREMENT)
//[K01]: http://www.memoryhole.net/kyle/2007/05/atomic_incrementing.html
//http://forums.devx.com/archive/index.php/t-160558.html
@@ -1382,10 +1360,6 @@ threadID CryGetCurrentThreadId()
return GetCurrentThreadId();
}
void CryDebugBreak()
{
__builtin_trap();
}
#endif//LINUX APPLE
#if defined(APPLE) || defined(LINUX)
@@ -1398,11 +1372,6 @@ DLL_EXPORT void OutputDebugString(const char* outputString)
#endif
}
DLL_EXPORT void DebugBreak()
{
CryDebugBreak();
}
#endif
// This code does not have a long life span and will be replaced soon
@@ -1626,16 +1595,6 @@ DWORD GetFileAttributes(LPCSTR lpFileName)
return (ret == 0) ? FILE_ATTRIBUTE_NORMAL : ret;//return file attribute normal as the default value, must only be set if no other attributes have been found
}
uint32 CryGetFileAttributes(const char* lpFileName)
{
string fn = lpFileName;
adaptFilenameToLinux(fn);
const char* buffer = fn.c_str();
return GetFileAttributes(buffer);
}
__finddata64_t::~__finddata64_t()
{
if (m_Dir != FS_DIR_NULL)