1
0
mirror of synced 2025-01-11 05:42:15 +01:00

fix: Disable recent files on web build since they can't work there

This commit is contained in:
WerWolv 2025-01-01 17:08:31 +01:00
parent 9f9c5abf35
commit 0e4d94946e
2 changed files with 8 additions and 1 deletions

View File

@ -347,6 +347,10 @@ namespace hex::plugin::builtin::recent {
} }
void addMenuItems() { void addMenuItems() {
#if defined(OS_WEB)
return;
#endif
ContentRegistry::Interface::addMenuItemSubMenu({ "hex.builtin.menu.file" }, 1200, [] { ContentRegistry::Interface::addMenuItemSubMenu({ "hex.builtin.menu.file" }, 1200, [] {
if (ImGui::BeginMenuEx("hex.builtin.menu.file.open_recent"_lang, ICON_VS_ARCHIVE, !recent::s_recentEntriesUpdating && !s_recentEntries.empty())) { if (ImGui::BeginMenuEx("hex.builtin.menu.file.open_recent"_lang, ICON_VS_ARCHIVE, !recent::s_recentEntriesUpdating && !s_recentEntries.empty())) {
// Copy to avoid changing list while iteration // Copy to avoid changing list while iteration

View File

@ -254,7 +254,10 @@ namespace hex::plugin::builtin {
// Draw recent entries // Draw recent entries
ImGui::Dummy({}); ImGui::Dummy({});
#if !defined(OS_WEB)
recent::draw(); recent::draw();
#endif
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 6); ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeightWithSpacing() * 6);
ImGui::TableNextColumn(); ImGui::TableNextColumn();