Skip to content

Commit

Permalink
Add missing ImGui_ImplSDL2_EmscriptenOpenURL function
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkewley committed Aug 2, 2024
1 parent ce7f022 commit 31024be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/oscar/UI/imgui_impl_sdl2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
return false;
}

#ifdef __EMSCRIPTEN__
EM_JS(void, ImGui_ImplSDL2_EmscriptenOpenURL, (char const* url), { url = url ? UTF8ToString(url) : null; if (url) window.open(url, '_blank'); });
#endif

static bool ImGui_ImplSDL2_Init(SDL_Window* window, SDL_Renderer* renderer, void* sdl_gl_context)
{
ImGuiIO& io = ImGui::GetIO();
Expand Down

0 comments on commit 31024be

Please sign in to comment.