Skip to content

Commit

Permalink
Fix missing IMGUI_API and mismatching namespace internal's CreateNewW…
Browse files Browse the repository at this point in the history
…indowSettings (#2105)
  • Loading branch information
lhamot authored and ocornut committed Sep 27, 2018
1 parent 61d94ff commit 9aae214
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8473,7 +8473,7 @@ void ImGui::MarkIniSettingsDirty(ImGuiWindow* window)
g.SettingsDirtyTimer = g.IO.IniSavingRate;
}

static ImGuiWindowSettings* CreateNewWindowSettings(const char* name)
static ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name)
{
ImGuiContext& g = *GImGui;
g.SettingsWindows.push_back(ImGuiWindowSettings());
Expand Down Expand Up @@ -8611,7 +8611,7 @@ static void* SettingsHandlerWindow_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*
{
ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHash(name, 0));
if (!settings)
settings = CreateNewWindowSettings(name);
settings = ImGui::CreateNewWindowSettings(name);
return (void*)settings;
}

Expand Down Expand Up @@ -8639,7 +8639,7 @@ static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSetting
ImGuiWindowSettings* settings = (window->SettingsIdx != -1) ? &g.SettingsWindows[window->SettingsIdx] : ImGui::FindWindowSettings(window->ID);
if (!settings)
{
settings = CreateNewWindowSettings(window->Name);
settings = ImGui::CreateNewWindowSettings(window->Name);
window->SettingsIdx = g.SettingsWindows.index_from_pointer(settings);
}
IM_ASSERT(settings->ID == window->ID);
Expand Down
2 changes: 1 addition & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ struct ImGuiInputTextCallbackData

// Helper functions for text manipulation.
// Use those function to benefit from the CallbackResize behaviors. Calling those function reset the selection.
ImGuiInputTextCallbackData();
IMGUI_API ImGuiInputTextCallbackData();
IMGUI_API void DeleteChars(int pos, int bytes_count);
IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL);
bool HasSelection() const { return SelectionStart != SelectionEnd; }
Expand Down

0 comments on commit 9aae214

Please sign in to comment.