Merge commit '12335da41bc30334c599dfc1d2e5b47dcf92ef0d' into dev

This commit is contained in:
BZLZHH
2025-08-10 23:18:41 +08:00
6 changed files with 19 additions and 4 deletions
+3 -1
View File
@@ -6,7 +6,9 @@
#endif
#ifdef _WIN32
#define NOMINMAX // prevent Windows.h from defining min and max macros
# ifndef NOMINMAX
#define NOMINMAX 1 // prevent Windows.h from defining min and max macros
#endif
#endif
// ================== MobileGL definitions and macros =================== //
+3 -1
View File
@@ -63,7 +63,9 @@
#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#include <windows.h>
#include <processthreadsapi.h>
#endif
+4
View File
@@ -4,6 +4,10 @@
#include <gtest/gtest.h>
#include "Includes.h"
#include <MG_State/GLState/Core.h>
#include <MG_Impl/GLImpl/Buffer/GL_Buffer.h>
#include <MG_Impl/GLImpl/Getter/GL_Getter.h>
using namespace MobileGL;
@@ -4,6 +4,9 @@
#include <gtest/gtest.h>
#include "Includes.h"
#include <MG_Util/Converters/GLToStr/GLEnumConverter.h>
#include <MG_Util/ShaderTranspiler/ShaderCompiler.h>
#include <MG_Util/ShaderTranspiler/Types.h>
using namespace MobileGL;
class ProgramUtilTest : public ::testing::Test {
@@ -1,5 +1,9 @@
#include <gtest/gtest.h>
#include "Includes.h"
#include <MG_Impl/GLImpl/Buffer/GL_Buffer.h>
#include <MG_Impl/GLImpl/Getter/GL_Getter.h>
#include <MG_Impl/GLImpl/VertexArray/GL_VertexArray.h>
#include <MG_State/GLState/Core.h>
using namespace MobileGL;
+2 -2
View File
@@ -21,13 +21,13 @@ namespace MobileGL {
std::string GetThreadName() {
char buffer[64] = { 0 };
#if defined(_WIN32)
#if defined(_WIN32) && !defined(__MINGW32__)
PWSTR desc = nullptr;
if (SUCCEEDED(GetThreadDescription(GetCurrentThread(), &desc))) {
WideCharToMultiByte(CP_UTF8, 0, desc, -1, buffer, sizeof(buffer), nullptr, nullptr);
LocalFree(desc);
}
#elif defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__)
#elif defined(__ANDROID__) || defined(__linux__) || defined(__APPLE__) || defined(__MINGW32__)
pthread_getname_np(pthread_self(), buffer, sizeof(buffer));
#endif
return buffer[0] ? buffer : "UnknownThread";