mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 13:21:34 +00:00
Relocate global webp decoder initilization
This commit is contained in:
parent
765cf43f69
commit
ac1024f5d3
@ -78,6 +78,10 @@
|
||||
#include "os/x11/system.h"
|
||||
#endif
|
||||
|
||||
#if ENABLE_WEBP && LAF_WINDOWS
|
||||
#include "app/util/decode_webp.h"
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
@ -482,6 +486,10 @@ void App::run()
|
||||
manager->display()->nativeWindow()
|
||||
->setInterpretOneFingerGestureAsMouseMovement(
|
||||
preferences().experimental.oneFingerAsMouseMovement());
|
||||
#if ENABLE_WEBP
|
||||
// In Windows we use a custom webp decoder for drag & drop operations.
|
||||
os::set_decode_webp(util::decode_webp);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LAF_LINUX
|
||||
|
@ -23,10 +23,6 @@
|
||||
#include "doc/layer_list.h"
|
||||
#include "render/dithering.h"
|
||||
|
||||
#if ENABLE_WEBP && LAF_WINDOWS
|
||||
#include "app/util/decode_webp.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace app {
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
#include "app/util/decode_webp.h"
|
||||
|
||||
#include "os/system.h"
|
||||
|
||||
#include <webp/demux.h>
|
||||
#include <webp/mux.h>
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "os/surface.h"
|
||||
#include "os/system.h"
|
||||
|
||||
namespace app {
|
||||
|
||||
@ -19,11 +18,6 @@ namespace util {
|
||||
// frame.
|
||||
os::SurfaceRef decode_webp(const uint8_t* buf, uint32_t len);
|
||||
|
||||
static void* once = []() {
|
||||
os::set_decode_webp(decode_webp);
|
||||
return nullptr;
|
||||
}();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user