From 90d0f4bb37f63199a50d712d01b73a0ec66af1c5 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Mon, 30 Dec 2013 15:36:37 +0300
Subject: Fix images drawing in software renderers.

---
 src/render/sdl2softwaregraphics.cpp | 4 ++--
 src/render/sdlgraphics.cpp          | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'src')

diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 7210e8bbf..c72dd5a7f 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -177,8 +177,8 @@ bool SDL2SoftwareGraphics::drawImage2(const Image *const image,
     {
         SDL_Rect srcRect =
         {
-            static_cast<int16_t>(0),
-            static_cast<int16_t>(0),
+            static_cast<int16_t>(srcX),
+            static_cast<int16_t>(srcY),
             static_cast<uint16_t>(w),
             static_cast<uint16_t>(h)
         };
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 5680243ca..83bf989d2 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -170,8 +170,8 @@ bool SDLGraphics::drawImage2(const Image *const image,
     {
         SDL_Rect srcRect =
         {
-            static_cast<int16_t>(0),
-            static_cast<int16_t>(0),
+            static_cast<int16_t>(srcX),
+            static_cast<int16_t>(srcY),
             static_cast<uint16_t>(w),
             static_cast<uint16_t>(h)
         };
-- 
cgit v1.2.3-70-g09d2