From 98876b4dc233d4b2cea22cc9a6d3e49a6ac2d59d Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 21 Jun 2021 14:52:01 +0200 Subject: [PATCH] Added IMGUI_DISABLE_SSE (#4250, #4091) --- imconfig.h | 1 + imgui_internal.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/imconfig.h b/imconfig.h index e0a2155a25e1..769e73915582 100644 --- a/imconfig.h +++ b/imconfig.h @@ -45,6 +45,7 @@ //#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies) //#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function. //#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions(). +//#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available //---- Include imgui_user.h at the end of imgui.h as a convenience //#define IMGUI_INCLUDE_IMGUI_USER_H diff --git a/imgui_internal.h b/imgui_internal.h index 09dc408c6752..6755adeae5ea 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -52,7 +52,7 @@ Index of this file: #include // INT_MIN, INT_MAX // Enable SSE intrinsics if available -#if defined __SSE__ || defined __x86_64__ || defined _M_X64 +#if (defined __SSE__ || defined __x86_64__ || defined _M_X64) && !defined(IMGUI_DISABLE_SSE) #define IMGUI_ENABLE_SSE #include #endif