mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
return bool true from Init for consistency with other backends (although no other outcome is possible)
This commit is contained in:
parent
ca7b9ca3d5
commit
796b15e894
@ -123,7 +123,7 @@ static ImGui_ImplEmscripten_Data* ImGui_ImplEmscripten_GetBackendData()
|
||||
return ImGui::GetCurrentContext() ? (ImGui_ImplEmscripten_Data*)ImGui::GetIO().BackendPlatformUserData : nullptr;
|
||||
}
|
||||
|
||||
void ImGui_ImplEmscripten_Init()
|
||||
bool ImGui_ImplEmscripten_Init()
|
||||
{
|
||||
// Initialise the Emscripten backend, setting input callbacks
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
@ -377,6 +377,8 @@ void ImGui_ImplEmscripten_Init()
|
||||
);
|
||||
|
||||
// TODO: Touch events
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImGui_ImplEmscripten_Shutdown()
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
extern IMGUI_IMPL_API float ImGui_ImplEmscripten_TargetDevicePixelRatio;
|
||||
|
||||
// Initialise the Emscripten backend, setting input callbacks. This should be called after ImGui::CreateContext();
|
||||
IMGUI_IMPL_API void ImGui_ImplEmscripten_Init();
|
||||
IMGUI_IMPL_API bool ImGui_ImplEmscripten_Init();
|
||||
|
||||
// Shut down the Emscripten backend. This unsets all Emscripten input callbacks set by Init.
|
||||
// Note it'll also unset any Emscripten input callbacks set elsewhere in the program!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user