Browse Source

Fixed incorrect logic.

Lasse Öörni 13 years ago
parent
commit
3cc1681733

+ 2 - 4
Engine/Graphics/Direct3D9/D3D9IndexBuffer.cpp

@@ -156,8 +156,7 @@ bool IndexBuffer::SetData(const void* data)
         if (graphics_->IsDeviceLost())
         if (graphics_->IsDeviceLost())
         {
         {
             LOGWARNING("Index buffer data assignment while device is lost");
             LOGWARNING("Index buffer data assignment while device is lost");
-            if (shadowData_)
-                dataPending_ = true;
+            dataPending_ = true;
             return false;
             return false;
         }
         }
         
         
@@ -209,8 +208,7 @@ bool IndexBuffer::SetDataRange(const void* data, unsigned start, unsigned count,
         if (graphics_->IsDeviceLost())
         if (graphics_->IsDeviceLost())
         {
         {
             LOGWARNING("Index buffer data assignment while device is lost");
             LOGWARNING("Index buffer data assignment while device is lost");
-            if (shadowData_)
-                dataPending_ = true;
+            dataPending_ = true;
             return false;
             return false;
         }
         }
         
         

+ 2 - 4
Engine/Graphics/Direct3D9/D3D9VertexBuffer.cpp

@@ -196,8 +196,7 @@ bool VertexBuffer::SetData(const void* data)
         if (graphics_->IsDeviceLost())
         if (graphics_->IsDeviceLost())
         {
         {
             LOGWARNING("Vertex buffer data assignment while device is lost");
             LOGWARNING("Vertex buffer data assignment while device is lost");
-            if (shadowData_)
-                dataPending_ = true;
+            dataPending_ = true;
             return false;
             return false;
         }
         }
         
         
@@ -249,8 +248,7 @@ bool VertexBuffer::SetDataRange(const void* data, unsigned start, unsigned count
         if (graphics_->IsDeviceLost())
         if (graphics_->IsDeviceLost())
         {
         {
             LOGWARNING("Vertex buffer data assignment while device is lost");
             LOGWARNING("Vertex buffer data assignment while device is lost");
-            if (shadowData_)
-                dataPending_ = true;
+            dataPending_ = true;
             return false;
             return false;
         }
         }