mirror of
https://github.com/love2d/megasource.git
synced 2026-08-16 16:21:13 +02:00
Update OpenAL-soft to 1.23.1-bc7cb17.
This commit is contained in:
@@ -11,13 +11,13 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_INTRIN_H
|
||||
#if defined(HAVE_CPUID_H)
|
||||
#include <cpuid.h>
|
||||
#elif defined(HAVE_INTRIN_H)
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
#ifdef HAVE_CPUID_H
|
||||
#include <cpuid.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
@@ -33,7 +33,7 @@ using reg_type = unsigned int;
|
||||
inline std::array<reg_type,4> get_cpuid(unsigned int f)
|
||||
{
|
||||
std::array<reg_type,4> ret{};
|
||||
__get_cpuid(f, &ret[0], &ret[1], &ret[2], &ret[3]);
|
||||
__get_cpuid(f, ret.data(), &ret[1], &ret[2], &ret[3]);
|
||||
return ret;
|
||||
}
|
||||
#define CAN_GET_CPUID
|
||||
@@ -51,14 +51,14 @@ inline std::array<reg_type,4> get_cpuid(unsigned int f)
|
||||
|
||||
} // namespace
|
||||
|
||||
al::optional<CPUInfo> GetCPUInfo()
|
||||
std::optional<CPUInfo> GetCPUInfo()
|
||||
{
|
||||
CPUInfo ret;
|
||||
|
||||
#ifdef CAN_GET_CPUID
|
||||
auto cpuregs = get_cpuid(0);
|
||||
if(cpuregs[0] == 0)
|
||||
return al::nullopt;
|
||||
return std::nullopt;
|
||||
|
||||
const reg_type maxfunc{cpuregs[0]};
|
||||
|
||||
@@ -138,5 +138,5 @@ al::optional<CPUInfo> GetCPUInfo()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return al::make_optional(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user