From 0d8293a5647c2bb10228658f0910515b38ff0d64 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 21 Oct 2020 21:32:51 +0200 Subject: Workaround sfml image loading thread race condition See: https://github.com/SFML/SFML/issues/1711 Also some other smaller changes --- include/SfmlFixes.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 include/SfmlFixes.hpp (limited to 'include/SfmlFixes.hpp') diff --git a/include/SfmlFixes.hpp b/include/SfmlFixes.hpp new file mode 100644 index 0000000..fc893c5 --- /dev/null +++ b/include/SfmlFixes.hpp @@ -0,0 +1,11 @@ +#pragma once + +#include + +namespace QuickMedia { + // See: https://github.com/SFML/SFML/issues/1711 + // TODO: Remove when above is fixed, or fix ourselves and include the fixed sfml version as a dependency, + // or write our own image class (maybe even use stb like sfml does but no error reason printing) + bool load_image_from_file(sf::Image &image, const std::string &filepath); + bool load_image_from_memory(sf::Image &image, const void *data, size_t size); +} \ No newline at end of file -- cgit v1.2.3