@@ -200,12 +200,12 @@ void updateJoystickDPadState(ImGuiIO& io);
200
200
void updateJoystickAxisState (ImGuiIO& io);
201
201
202
202
// clipboard functions
203
- void setClipboardText (void * /* userData */ , const char * text)
203
+ void setClipboardText (ImGuiContext * /* ctx */ , const char * text)
204
204
{
205
205
sf::Clipboard::setString (sf::String::fromUtf8 (text, text + std::strlen (text)));
206
206
}
207
207
208
- [[nodiscard]] const char * getClipboardText (void * /* userData */ )
208
+ [[nodiscard]] const char * getClipboardText (ImGuiContext * /* ctx */ )
209
209
{
210
210
static std::string s_clipboardText;
211
211
@@ -307,6 +307,7 @@ bool Init(sf::Window& window, const sf::Vector2f& displaySize, bool loadDefaultF
307
307
ImGui::SetCurrentContext (s_currWindowCtx->imContext );
308
308
309
309
ImGuiIO& io = ImGui::GetIO ();
310
+ ImGuiPlatformIO& platform_io = ImGui::GetPlatformIO ();
310
311
311
312
// tell ImGui which features we support
312
313
io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
@@ -322,8 +323,8 @@ bool Init(sf::Window& window, const sf::Vector2f& displaySize, bool loadDefaultF
322
323
io.DisplaySize = toImVec2 (displaySize);
323
324
324
325
// clipboard
325
- io. SetClipboardTextFn = setClipboardText;
326
- io. GetClipboardTextFn = getClipboardText;
326
+ platform_io. Platform_SetClipboardTextFn = setClipboardText;
327
+ platform_io. Platform_GetClipboardTextFn = getClipboardText;
327
328
328
329
// load mouse cursors
329
330
const auto loadMouseCursor = [](ImGuiMouseCursor imguiCursorType, sf::Cursor::Type sfmlCursorType)
0 commit comments