mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
Merge pull request #110 from xwizard/macos-arm64-build
Add macOS ARM64 build support
This commit is contained in:
@@ -9,7 +9,7 @@ http://mozilla.org/MPL/2.0/.
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#if defined(__APPLE__) && !__has_include(<AL/al.h>)
|
||||||
#include <OpenAL/al.h>
|
#include <OpenAL/al.h>
|
||||||
#include <OpenAL/alc.h>
|
#include <OpenAL/alc.h>
|
||||||
#else
|
#else
|
||||||
|
|||||||
4
stdafx.h
4
stdafx.h
@@ -89,7 +89,11 @@
|
|||||||
#define glfwFocusWindow(w)
|
#define glfwFocusWindow(w)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__aarch64__) || defined(__arm64__)
|
||||||
|
#define GLM_FORCE_NEON
|
||||||
|
#else
|
||||||
#define GLM_FORCE_AVX2
|
#define GLM_FORCE_AVX2
|
||||||
|
#endif
|
||||||
#define GLM_FORCE_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#define GLM_ENABLE_EXPERIMENTAL
|
#define GLM_ENABLE_EXPERIMENTAL
|
||||||
#define GLM_FORCE_CTOR_INIT
|
#define GLM_FORCE_CTOR_INIT
|
||||||
|
|||||||
@@ -41,9 +41,18 @@ bool DebugTractionFlag = false;
|
|||||||
|
|
||||||
std::string Now()
|
std::string Now()
|
||||||
{
|
{
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||||
|
std::tm tm{};
|
||||||
|
localtime_r(&t, &tm);
|
||||||
|
char buf[64];
|
||||||
|
std::strftime(buf, sizeof(buf), "%c", &tm);
|
||||||
|
return std::string(buf);
|
||||||
|
#else
|
||||||
auto now = std::chrono::system_clock::now();
|
auto now = std::chrono::system_clock::now();
|
||||||
auto local = std::chrono::current_zone()->to_local(now);
|
auto local = std::chrono::current_zone()->to_local(now);
|
||||||
return std::format("{:%c}", local);
|
return std::format("{:%c}", local);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// zwraca różnicę czasu
|
// zwraca różnicę czasu
|
||||||
|
|||||||
Reference in New Issue
Block a user