From 8cbb693f4764f19983588d5f1b9ddd92a7873c8f Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Sat, 25 Jan 2020 23:49:23 +0300 Subject: [PATCH] Emscripten: Allow filesystem support. (#3005) Filesystem functions perfectly work for Emscripten platform. This changes remove extra changes added by #2734. You can still disable filesystem functions by defining IMGUI_DISABLE_FILE_FUNCTIONS. --- docs/CHANGELOG.txt | 3 ++- imgui_internal.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index ebd82d445..6f73c077a 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -85,6 +85,7 @@ Other Changes: - Misc: Added misc/single_file/imgui_single_file.h, We use this to validate compiling all *.cpp files in a same compilation unit. Actual users of that technique (also called "Unity builds") can generally provide this themselves, so we don't really recommend you use this. [@rokups] +- CI: Added PVS-Studio static analysis on the continuous-integration server. [@rokups] - Backends: GLFW, SDL, Win32, OSX, Allegro: Added support for ImGuiMouseCursor_NotAllowed. [@rokups] - Backends: GLFW: Added support for the missing mouse cursors newly added in GLFW 3.4+. [@rokups] - Backends: SDL: Wayland: use SDL_GetMouseState (because there is no global mouse state available @@ -98,7 +99,7 @@ Other Changes: the later may be problematic if compiling with recent Windows SDK and you want your app to run on Windows 7. You can instead try linking with Xinput9_1_0.lib instead. (#2716) - Backends: Glut: Improved FreeGLUT support for MinGW. (#3004) [@podsvirov] -- CI: Added PVS-Studio static analysis on the continuous-integration server. [@rokups] +- Backends: Emscripten: Avoid forcefully setting IMGUI_DISABLE_FILE_FUNCTIONS. (#3005) [@podsvirov] - Examples: Explicitly adding -DIMGUI_IMPL_OPENGL_LOADER_GL3W to Makefile to match linking settings (otherwise if another loader such as Glew is accessible, the OpenGL3 backend might automatically use it). (#2919, #2798) diff --git a/imgui_internal.h b/imgui_internal.h index b1eb00d46..18b960a4b 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -270,9 +270,6 @@ static inline ImVec4 operator*(const ImVec4& lhs, const ImVec4& rhs) #endif // Helpers: File System -#if defined(__EMSCRIPTEN__) && !defined(IMGUI_DISABLE_FILE_FUNCTIONS) -#define IMGUI_DISABLE_FILE_FUNCTIONS -#endif #ifdef IMGUI_DISABLE_FILE_FUNCTIONS #define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS typedef void* ImFileHandle;