mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Initial commit
added libraries: opus flac libsndfile updated: libvorbis libogg openal - Everything works as expected for now. Bare in mind libsndfile needed the check for whether or not it could find the xiph libraries removed in order for this to work.
This commit is contained in:
parent
05a083ca6f
commit
a745fc3757
1954 changed files with 431332 additions and 21037 deletions
|
|
@ -34,7 +34,8 @@
|
|||
|
||||
void althrd_setname(const char *name)
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_MSC_VER) && !defined(_M_ARM)
|
||||
|
||||
#define MS_VC_EXCEPTION 0x406D1388
|
||||
#pragma pack(push,8)
|
||||
struct {
|
||||
|
|
@ -55,7 +56,9 @@ void althrd_setname(const char *name)
|
|||
__except(EXCEPTION_CONTINUE_EXECUTION) {
|
||||
}
|
||||
#undef MS_VC_EXCEPTION
|
||||
|
||||
#else
|
||||
|
||||
(void)name;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -76,7 +79,7 @@ semaphore::~semaphore()
|
|||
|
||||
void semaphore::post()
|
||||
{
|
||||
if UNLIKELY(!ReleaseSemaphore(static_cast<HANDLE>(mSem), 1, nullptr))
|
||||
if(!ReleaseSemaphore(static_cast<HANDLE>(mSem), 1, nullptr))
|
||||
throw std::system_error(std::make_error_code(std::errc::value_too_large));
|
||||
}
|
||||
|
||||
|
|
@ -100,7 +103,8 @@ namespace {
|
|||
|
||||
using setname_t1 = int(*)(const char*);
|
||||
using setname_t2 = int(*)(pthread_t, const char*);
|
||||
using setname_t3 = int(*)(pthread_t, const char*, void*);
|
||||
using setname_t3 = void(*)(pthread_t, const char*);
|
||||
using setname_t4 = int(*)(pthread_t, const char*, void*);
|
||||
|
||||
void setname_caller(setname_t1 func, const char *name)
|
||||
{ func(name); }
|
||||
|
|
@ -109,6 +113,9 @@ void setname_caller(setname_t2 func, const char *name)
|
|||
{ func(pthread_self(), name); }
|
||||
|
||||
void setname_caller(setname_t3 func, const char *name)
|
||||
{ func(pthread_self(), name); }
|
||||
|
||||
void setname_caller(setname_t4 func, const char *name)
|
||||
{ func(pthread_self(), "%s", static_cast<void*>(const_cast<char*>(name))); }
|
||||
|
||||
} // namespace
|
||||
|
|
@ -125,6 +132,7 @@ void althrd_setname(const char *name)
|
|||
std::ignore = static_cast<void(*)(setname_t1,const char*)>(&setname_caller);
|
||||
std::ignore = static_cast<void(*)(setname_t2,const char*)>(&setname_caller);
|
||||
std::ignore = static_cast<void(*)(setname_t3,const char*)>(&setname_caller);
|
||||
std::ignore = static_cast<void(*)(setname_t4,const char*)>(&setname_caller);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue