1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
diff --color -rbu ./backends/imgui_impl_opengl3.cpp ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3.cpp
--- ./backends/imgui_impl_opengl3.cpp 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3.cpp 2024-10-07 18:30:56
@@ -114,7 +114,7 @@
#define _CRT_SECURE_NO_WARNINGS
#endif
-#include "imgui.h"
+#include "backends/imgui/imgui.h"
#ifndef IMGUI_DISABLE
#include "imgui_impl_opengl3.h"
#include <stdio.h>
@@ -167,6 +167,7 @@
// - You may need to regenerate imgui_impl_opengl3_loader.h to add new symbols. See https://github.com/dearimgui/gl3w_stripped
// - You can temporarily use an unstripped version. See https://github.com/dearimgui/gl3w_stripped/releases
// Changes to this backend using new APIs should be accompanied by a regenerated stripped loader version.
+#define IMGL3W_SCUMMVM_LOADER
#define IMGL3W_IMPL
#include "imgui_impl_opengl3_loader.h"
#endif
diff --color -rbu ./backends/imgui_impl_opengl3.h ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3.h
--- ./backends/imgui_impl_opengl3.h 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3.h 2024-10-07 18:30:56
@@ -27,7 +27,7 @@
// Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp.
#pragma once
-#include "imgui.h" // IMGUI_IMPL_API
+#include "backends/imgui/imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
// Follow "Getting Started" link and check examples/ folder to learn about using backends!
@@ -56,7 +56,7 @@
#endif
#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__))
#define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es"
-#elif defined(__EMSCRIPTEN__) || defined(__amigaos4__)
+#elif defined(__EMSCRIPTEN__)
#define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
#else
// Otherwise imgui_impl_opengl3_loader.h will be used.
diff --color -rbu ./backends/imgui_impl_opengl3_loader.h ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3_loader.h
--- ./backends/imgui_impl_opengl3_loader.h 2024-05-17 22:26:35
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_opengl3_loader.h 2024-10-07 18:30:56
@@ -56,6 +56,11 @@
#ifndef __gl3w_h_
#define __gl3w_h_
+#if defined(IMGL3W_SCUMMVM_LOADER)
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "common/system.h"
+#endif
+
// Adapted from KHR/khrplatform.h to avoid including entire file.
#ifndef __khrplatform_h_
typedef float khronos_float_t;
@@ -614,7 +619,20 @@
#define GL3W_ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-#if defined(_WIN32)
+#if defined(IMGL3W_SCUMMVM_LOADER)
+static int open_libgl(void)
+{
+ return GL3W_OK;
+}
+
+static void close_libgl(void) { }
+
+static GL3WglProc get_proc(const char *proc)
+{
+ return (GL3WglProc)g_system->getOpenGLProcAddress(proc);
+}
+
+#elif defined(_WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
diff --color -rbu ./backends/imgui_impl_sdl2.cpp ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdl2.cpp
--- ./backends/imgui_impl_sdl2.cpp 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdl2.cpp 2024-10-07 18:30:56
@@ -92,9 +92,11 @@
// 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1).
// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
-#include "imgui.h"
+#include "backends/imgui/imgui.h"
#ifndef IMGUI_DISABLE
+#include "backends/platform/sdl/sdl.h"
#include "imgui_impl_sdl2.h"
+#if SDL_VERSION_ATLEAST(2, 0, 0)
// Clang warnings with -Weverything
#if defined(__clang__)
@@ -128,7 +128,8 @@
#define SDL_HAS_DISPLAY_EVENT SDL_VERSION_ATLEAST(2,0,9)
#define SDL_HAS_SHOW_WINDOW_ACTIVATION_HINT SDL_VERSION_ATLEAST(2,0,18)
#if SDL_HAS_VULKAN
-extern "C" { extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window* window, int* w, int* h); }
+//extern "C" { extern DECLSPEC void SDLCALL SDL_Vulkan_GetDrawableSize(SDL_Window* window, int* w, int* h); }
+#include <SDL_vulkan.h>
-#elif
+#else
static const Uint32 SDL_WINDOW_VULKAN = 0x10000000;
#endif
@@ -346,6 +348,11 @@
return ImGui::FindViewportByPlatformHandle((void*)(intptr_t)window_id);
}
+bool ImGui_ImplSDL2_Ready()
+{
+ return ImGui_ImplSDL2_GetBackendData() != nullptr;
+}
+
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
@@ -1201,4 +1208,5 @@
#pragma clang diagnostic pop
#endif
+#endif
#endif // #ifndef IMGUI_DISABLE
diff --color -rbu ./backends/imgui_impl_sdl2.h ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdl2.h
--- ./backends/imgui_impl_sdl2.h 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdl2.h 2024-10-07 18:30:56
@@ -23,7 +23,7 @@
// - Introduction, links and more at the top of imgui.cpp
#pragma once
-#include "imgui.h" // IMGUI_IMPL_API
+#include "backends/imgui/imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
struct SDL_Window;
@@ -41,6 +41,7 @@
IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown();
IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame();
IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event);
+IMGUI_IMPL_API bool ImGui_ImplSDL2_Ready();
// Gamepad selection automatically starts in AutoFirst mode, picking first available SDL_Gamepad. You may override this.
// When using manual mode, caller is responsible for opening/closing gamepad.
diff --color -rbu ./backends/imgui_impl_sdlrenderer2.cpp ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdlrenderer2.cpp
--- ./backends/imgui_impl_sdlrenderer2.cpp 2024-05-22 17:43:07
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdlrenderer2.cpp 2024-10-07 18:30:56
@@ -30,7 +30,7 @@
// 2021-10-06: Backup and restore modified ClipRect/Viewport.
// 2021-09-21: Initial version.
-#include "imgui.h"
+#include "backends/imgui/imgui.h"
#ifndef IMGUI_DISABLE
#include "imgui_impl_sdlrenderer2.h"
#include <stdint.h> // intptr_t
diff --color -rbu ./backends/imgui_impl_sdlrenderer2.h ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdlrenderer2.h
--- ./backends/imgui_impl_sdlrenderer2.h 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/backends/imgui_impl_sdlrenderer2.h 2024-10-07 18:30:56
@@ -22,8 +22,8 @@
// - Introduction, links and more at the top of imgui.cpp
#pragma once
+#include "backends/imgui/imgui.h" // IMGUI_IMPL_API
#ifndef IMGUI_DISABLE
-#include "imgui.h" // IMGUI_IMPL_API
struct SDL_Renderer;
diff --color -rbu ./imgui.h ../scummvm/scummvm/backends/imgui/imgui.h
--- ./imgui.h 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/imgui.h 2024-10-07 18:30:56
@@ -105,8 +105,10 @@
#define IM_FMTARGS(FMT) __attribute__((format(gnu_printf, FMT, FMT+1)))
#define IM_FMTLIST(FMT) __attribute__((format(gnu_printf, FMT, 0)))
#elif !defined(IMGUI_USE_STB_SPRINTF) && (defined(__clang__) || defined(__GNUC__))
-#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
-#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
+//#define IM_FMTARGS(FMT) __attribute__((format(printf, FMT, FMT+1)))
+//#define IM_FMTLIST(FMT) __attribute__((format(printf, FMT, 0)))
+#define IM_FMTARGS(FMT)
+#define IM_FMTLIST(FMT)
#else
#define IM_FMTARGS(FMT)
#define IM_FMTLIST(FMT)
diff --color -rbu ./misc/freetype/imgui_freetype.cpp ../scummvm/scummvm/backends/imgui/misc/freetype/imgui_freetype.cpp
--- ./misc/freetype/imgui_freetype.cpp 2024-10-07 18:21:01
+++ ../scummvm/scummvm/backends/imgui/misc/freetype/imgui_freetype.cpp 2024-10-07 18:32:37
@@ -34,10 +34,10 @@
// FIXME: cfg.OversampleH, OversampleV are not supported (but perhaps not so necessary with this rasterizer).
-#include "imgui.h"
+#include "backends/imgui/imgui.h"
#ifndef IMGUI_DISABLE
#include "imgui_freetype.h"
-#include "imgui_internal.h" // ImMin,ImMax,ImFontAtlasBuild*,
+#include "backends/imgui/imgui_internal.h" // ImMin,ImMax,ImFontAtlasBuild*,
#include <stdint.h>
#include <ft2build.h>
#include FT_FREETYPE_H // <freetype/freetype.h>
@@ -396,7 +396,7 @@
#ifdef IMGUI_STB_RECT_PACK_FILENAME
#include IMGUI_STB_RECT_PACK_FILENAME
#else
-#include "imstb_rectpack.h"
+#include "backends/imgui/imstb_rectpack.h"
#endif
#endif
diff --color -rbu ./misc/freetype/imgui_freetype.h ../scummvm/scummvm/backends/imgui/misc/freetype/imgui_freetype.h
--- ./misc/freetype/imgui_freetype.h 2024-05-13 22:08:39
+++ ../scummvm/scummvm/backends/imgui/misc/freetype/imgui_freetype.h 2024-10-07 18:32:44
@@ -2,7 +2,7 @@
// (headers)
#pragma once
-#include "imgui.h" // IMGUI_API
+#include "backends/imgui/imgui.h" // IMGUI_API
#ifndef IMGUI_DISABLE
// Forward declarations
|