Browse Source

- ThreadDispatcher::sendCallback returns value
- WebImage child touch disabled
- min

dmuratshin 9 years ago
parent
commit
c669e9aa20

+ 1 - 1
oxygine/src/Image.cpp

@@ -812,7 +812,7 @@ namespace oxygine
 
     void Image::toPOT(Image& dest)
     {
-		OX_ASSERT(this != &dest);
+        OX_ASSERT(this != &dest);
         dest.init(nextPOT(_image.w), nextPOT(_image.h), _image.format);
         dest.fill_zero();
         dest.updateRegion(0, 0, _image);

+ 1 - 0
oxygine/src/WebImage.cpp

@@ -20,6 +20,7 @@ namespace oxygine
         setSize(64, 64);
         _image = new Sprite;
         _image->setName("_child_");
+        _image->setTouchEnabled(false);
         addChild(_image);
     }
 

+ 3 - 1
oxygine/src/core/ThreadDispatcher.cpp

@@ -278,7 +278,7 @@ namespace oxygine
         return _result;
     }
 
-    void ThreadDispatcher::sendCallback(void* arg1, void* arg2, callback cb, void* cbData, bool highPriority)
+    void* ThreadDispatcher::sendCallback(void* arg1, void* arg2, callback cb, void* cbData, bool highPriority)
     {
         message ev;
         ev.arg1 = arg1;
@@ -290,6 +290,8 @@ namespace oxygine
         MutexPthreadLock lock(_mutex);
 #endif
         _pushMessageWaitReply(ev, highPriority);
+
+        return _result;
     }
 
     void ThreadDispatcher::_pushMessageWaitReply(message& msg, bool highPriority)

+ 1 - 1
oxygine/src/core/ThreadDispatcher.h

@@ -91,7 +91,7 @@ namespace oxygine
         //blocking, sends message and waiting reply from other thread
         void* send(int msgid, void* arg1, void* arg2);
         //blocking, sends callback and waiting until it is done
-        void sendCallback(void* arg1, void* arg2, callback cb, void* cbData, bool highPriority = false);
+        void* sendCallback(void* arg1, void* arg2, callback cb, void* cbData, bool highPriority = false);
 #ifndef __S3E__
         //blocking, sends callback and waiting until it is done
         void sendCallback(const std::function<void()>&);

+ 4 - 4
oxygine/src/core/oxygine.cpp

@@ -613,7 +613,7 @@ namespace oxygine
                 switch (event.type)
                 {
                     case SDL_QUIT:
-						log::messageln("SDL_QUIT");
+                        log::messageln("SDL_QUIT");
                         done = true;
                         break;
                     case SDL_WINDOWEVENT:
@@ -639,7 +639,7 @@ namespace oxygine
                             newFocus = true;
 #ifdef __ANDROID__
                         //if (event.window.event == SDL_WINDOWEVENT_ENTER)
-                         //   newFocus = true;
+                        //   newFocus = true;
 #endif
 
                         if (focus != newFocus)
@@ -787,7 +787,7 @@ namespace oxygine
 
         void release()
         {
-			log::messageln("core::release");
+            log::messageln("core::release");
 
             _threadMessages.clear();
             _uiMessages.clear();
@@ -862,7 +862,7 @@ namespace oxygine
 
         void requestQuit()
         {
-			log::messageln("requestQuit");
+            log::messageln("requestQuit");
 #ifdef __S3E__
             s3eDeviceRequestQuit();
 #elif OXYGINE_SDL