瀏覽代碼

Merge branch 'websockets-implementation' of github.com:urho3d/Urho3D into websockets-implementation

Arnis Lielturks 5 年之前
父節點
當前提交
de3299b71b

+ 4 - 2
CMake/Modules/CheckCompilerToolchain.cmake

@@ -33,7 +33,7 @@
 #  X86
 #  E2K
 #
-# CPU SIMD instruction extensions support for x86/x86_64 archs:
+# CPU SIMD instruction extensions support for x86/x86_64/e2k archs:
 #  HAVE_MMX
 #  HAVE_3DNOW
 #  HAVE_SSE
@@ -42,6 +42,8 @@
 #  HAVE_SSE4
 #  HAVE_AVX
 #  HAVE_AVX2
+#
+# CPU SIMD instruction extension support for powerpc/powerpc64 archs:
 #  HAVE_ALTIVEC
 #
 # CPU SIMD instruction extension support for arm/arm64 archs:
@@ -223,7 +225,7 @@ else ()
         endif ()
     elseif (POWERPC)
         check_extension (altivec)
-    elseif (X86)
+    elseif (X86 OR E2K)
         foreach (ext sse sse2 sse3 sse4 avx avx2)
             check_extension (${ext})
         endforeach ()

+ 3 - 3
CMake/Modules/UrhoCommon.cmake

@@ -177,7 +177,7 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
     # On Windows platform Direct3D11 can be optionally chosen
     # Using Direct3D11 on non-MSVC compiler may require copying and renaming Microsoft official libraries (.lib to .a), else link failures or non-functioning graphics may result
     cmake_dependent_option (URHO3D_D3D11 "Use Direct3D11 instead of Direct3D9 (Windows platform only); overrides URHO3D_OPENGL option" FALSE "WIN32" FALSE)
-    if (X86 OR WEB)
+    if (X86 OR E2K OR WEB)
         # TODO: Rename URHO3D_SSE to URHO3D_SIMD
         if (MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.1)
             if (NOT DEFINED URHO3D_SSE)     # Only give the warning once during initial configuration
@@ -193,8 +193,8 @@ if (CMAKE_PROJECT_NAME STREQUAL Urho3D)
         cmake_dependent_option (URHO3D_SSE "Enable SIMD instruction set (32-bit Web and Intel platforms only, including Android on Intel Atom); default to true on Intel and false on Web platform; the effective SSE level could be higher, see also URHO3D_DEPLOYMENT_TARGET and CMAKE_OSX_DEPLOYMENT_TARGET build options" "${URHO3D_DEFAULT_SIMD}" "NOT URHO3D_64BIT" TRUE)
     endif ()
     cmake_dependent_option (URHO3D_HASH_DEBUG "Enable StringHash reversing and hash collision detection at the expense of memory and performance penalty" FALSE "NOT CMAKE_BUILD_TYPE STREQUAL Release" FALSE)
-    cmake_dependent_option (URHO3D_3DNOW "Enable 3DNow! instruction set (Linux platform only); should only be used for older CPU with (legacy) 3DNow! support" "${HAVE_3DNOW}" "X86 AND CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT URHO3D_SSE" FALSE)
-    cmake_dependent_option (URHO3D_MMX "Enable MMX instruction set (32-bit Linux platform only); the MMX is effectively enabled when 3DNow! or SSE is enabled; should only be used for older CPU with MMX support" "${HAVE_MMX}" "X86 AND CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT URHO3D_64BIT AND NOT URHO3D_SSE AND NOT URHO3D_3DNOW" FALSE)
+    cmake_dependent_option (URHO3D_3DNOW "Enable 3DNow! instruction set (Linux platform only); should only be used for older CPU with (legacy) 3DNow! support" "${HAVE_3DNOW}" "X86 OR E2K AND CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT URHO3D_SSE" FALSE)
+    cmake_dependent_option (URHO3D_MMX "Enable MMX instruction set (32-bit Linux platform only); the MMX is effectively enabled when 3DNow! or SSE is enabled; should only be used for older CPU with MMX support" "${HAVE_MMX}" "X86 OR E2K AND CMAKE_SYSTEM_NAME STREQUAL Linux AND NOT URHO3D_64BIT AND NOT URHO3D_SSE AND NOT URHO3D_3DNOW" FALSE)
     # For completeness sake - this option is intentionally not documented as we do not officially support PowerPC (yet)
     cmake_dependent_option (URHO3D_ALTIVEC "Enable AltiVec instruction set (PowerPC only)" "${HAVE_ALTIVEC}" POWERPC FALSE)
     cmake_dependent_option (URHO3D_LUAJIT "Enable Lua scripting support using LuaJIT (check LuaJIT's CMakeLists.txt for more options)" FALSE "NOT WEB" FALSE)

+ 1 - 1
Source/Tools/PackageTool/PackageTool.cpp

@@ -145,7 +145,7 @@ void Run(const Vector<String>& arguments)
         for (unsigned i = fileNames.Size() - 1; i < fileNames.Size(); --i)
         {
             String extension = GetExtension(fileNames[i]);
-            for (unsigned j = 0; j < ignoreExtensions_[j].Length(); ++j)
+            for (unsigned j = 0; ignoreExtensions_[j].Length(); ++j)
             {
                 if (extension == ignoreExtensions_[j])
                 {

+ 1 - 1
Source/Urho3D/Graphics/CustomGeometry.cpp

@@ -321,7 +321,7 @@ void CustomGeometry::FillShape(const Vector<Vector3>& shapeList, bool connectTai
         auto nextIt = it;
         while (it != shapeList.End()) {
             nextIt = it + 1;
-            if (connectTail && nextIt == shapeList.End() || nextIt != shapeList.End())
+            if ((connectTail && nextIt == shapeList.End()) || nextIt != shapeList.End())
             {
                 current = (*it);
 

+ 6 - 0
Source/Urho3D/UI/Sprite.cpp

@@ -247,6 +247,9 @@ const Matrix3x4& Sprite::GetTransform() const
             case HA_RIGHT:
                 pos.x_ += (float)parent_->GetSize().x_;
                 break;
+
+            case HA_CUSTOM:
+                break;
             }
             switch (GetVerticalAlignment())
             {
@@ -260,6 +263,9 @@ const Matrix3x4& Sprite::GetTransform() const
             case VA_BOTTOM:
                 pos.y_ += (float)(parent_->GetSize().y_);
                 break;
+
+            case VA_CUSTOM:
+                break;
             }
         }
         else

+ 2 - 0
Source/Urho3D/UI/Text.cpp

@@ -779,6 +779,8 @@ int Text::GetRowStartPosition(unsigned rowIndex) const
     case HA_RIGHT:
         ret += GetSize().x_ - rowWidth;
         break;
+    case HA_CUSTOM:
+        break;
     }
 
     return ret;

+ 6 - 0
Source/Urho3D/UI/Text3D.cpp

@@ -589,6 +589,9 @@ void Text3D::UpdateTextBatches()
     case HA_RIGHT:
         offset.x_ -= (float)text_.GetWidth();
         break;
+
+    case HA_CUSTOM:
+        break;
     }
 
     switch (text_.GetVerticalAlignment())
@@ -603,6 +606,9 @@ void Text3D::UpdateTextBatches()
     case VA_BOTTOM:
         offset.y_ -= (float)text_.GetHeight();
         break;
+
+    case VA_CUSTOM:
+        break;
     }
 
     if (uiVertexData_.Size())

+ 8 - 3
Source/Urho3D/UI/ToolTip.cpp

@@ -74,10 +74,15 @@ void ToolTip::Update(float timeStep)
             SharedPtr<UIElement> target = it->Lock();
             if (!target)
                 it = altTargets_.Erase(it);
-            else if (hovering = target->IsHovering() && target->IsVisibleEffective())
-                break;
             else
-                ++it;
+            {
+                hovering = target->IsHovering() && target->IsVisibleEffective();
+
+                if (hovering)
+                    break;
+                else
+                    ++it;
+            }
         }
     }