diff --git a/src/kiwano-audio/AudioEngine.cpp b/src/kiwano-audio/AudioEngine.cpp index d4d013b3..652bd1a7 100644 --- a/src/kiwano-audio/AudioEngine.cpp +++ b/src/kiwano-audio/AudioEngine.cpp @@ -18,6 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#include // DX::ThrowIfFailed #include #include diff --git a/src/kiwano/ui/Button.cpp b/src/kiwano/ui/Button.cpp index 83acd556..3684e61f 100644 --- a/src/kiwano/ui/Button.cpp +++ b/src/kiwano/ui/Button.cpp @@ -113,7 +113,7 @@ namespace kiwano Window::instance().SetCursor(CursorType::Hand); if (mouse_over_callback_) - mouse_over_callback_(); + mouse_over_callback_(this); } else if (evt.IsType()) { @@ -121,24 +121,24 @@ namespace kiwano Window::instance().SetCursor(CursorType::Arrow); if (mouse_out_callback_) - mouse_out_callback_(); + mouse_out_callback_(this); } else if (evt.IsType() && status_ == Status::Hover) { SetStatus(Status::Pressed); if (pressed_callback_) - pressed_callback_(); + pressed_callback_(this); } else if (evt.IsType() && status_ == Status::Pressed) { SetStatus(Status::Hover); if (released_callback_) - released_callback_(); + released_callback_(this); if (click_callback_) - click_callback_(); + click_callback_(this); } } } diff --git a/src/kiwano/utils/ResourceCache.cpp b/src/kiwano/utils/ResourceCache.cpp index 52a0e39b..23632e95 100644 --- a/src/kiwano/utils/ResourceCache.cpp +++ b/src/kiwano/utils/ResourceCache.cpp @@ -240,6 +240,7 @@ namespace kiwano AddObject(id, fs); return fs->GetFramesCount(); } + return 0; } size_t ResourceCache::AddFrameSequence(String const& id, FramePtr frame, int cols, int rows, float padding_x, float padding_y) @@ -386,7 +387,11 @@ namespace kiwano if (rows || cols) { // Frame slices - return !!loader->AddFrameSequence(*id, gdata->path + (*file), std::max(cols, 1), std::max(rows, 1), padding_x, padding_y); + FramePtr frame = new (std::nothrow) Frame; + if (frame && frame->Load(gdata->path + (*file))) + { + return !!loader->AddFrameSequence(*id, frame, std::max(cols, 1), std::max(rows, 1), padding_x, padding_y); + } } else {