mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 15:57:03 -05:00
Compare commits
7 Commits
v1.37.3
...
releases/v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f8131b7c4 | ||
|
|
b6b24dfd29 | ||
|
|
041f113402 | ||
|
|
5f61fe2c4f | ||
|
|
96cc7e8ba8 | ||
|
|
22b3daf082 | ||
|
|
1deb27a6df |
@@ -329,6 +329,7 @@ macro(createPackage)
|
||||
|
||||
install(FILES ${IMHEX_ICON} DESTINATION "${CMAKE_INSTALL_PREFIX}/${BUNDLE_NAME}/Contents/Resources")
|
||||
install(TARGETS main BUNDLE DESTINATION ".")
|
||||
install(TARGETS updater BUNDLE DESTINATION ".")
|
||||
|
||||
# Update library references to make the bundle portable
|
||||
postprocess_bundle(imhex_all main)
|
||||
|
||||
@@ -260,9 +260,6 @@ namespace ImGuiExt {
|
||||
}
|
||||
|
||||
Texture::Texture(Texture&& other) noexcept {
|
||||
if (m_textureId != 0)
|
||||
glDeleteTextures(1, reinterpret_cast<GLuint*>(&m_textureId));
|
||||
|
||||
m_textureId = other.m_textureId;
|
||||
m_width = other.m_width;
|
||||
m_height = other.m_height;
|
||||
@@ -271,8 +268,10 @@ namespace ImGuiExt {
|
||||
}
|
||||
|
||||
Texture& Texture::operator=(Texture&& other) noexcept {
|
||||
if (m_textureId != 0)
|
||||
glDeleteTextures(1, reinterpret_cast<GLuint*>(&m_textureId));
|
||||
if (this == &other)
|
||||
return *this;
|
||||
|
||||
this->reset();
|
||||
|
||||
m_textureId = other.m_textureId;
|
||||
m_width = other.m_width;
|
||||
@@ -288,6 +287,11 @@ namespace ImGuiExt {
|
||||
}
|
||||
|
||||
void Texture::reset() {
|
||||
#if !defined(OS_WEB)
|
||||
if (glDeleteTextures == nullptr)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (m_textureId != 0) {
|
||||
glDeleteTextures(1, reinterpret_cast<GLuint*>(&m_textureId));
|
||||
m_textureId = 0;
|
||||
|
||||
@@ -303,7 +303,7 @@ namespace hex {
|
||||
|
||||
{
|
||||
std::unique_lock lock(m_sleepMutex);
|
||||
m_sleepCondVar.wait_for(lock, std::chrono::microseconds(100));
|
||||
m_sleepCondVar.wait(lock);
|
||||
if (m_sleepFlag.exchange(false))
|
||||
break;
|
||||
}
|
||||
@@ -1233,6 +1233,7 @@ namespace hex {
|
||||
m_wakeupCondVar.wait_for(lock, requestedFrameTime, [&] {
|
||||
return m_wakeupFlag || stopToken.stop_requested();
|
||||
});
|
||||
m_wakeupFlag = false;
|
||||
}
|
||||
|
||||
endTime = std::chrono::steady_clock::now();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <hex/api/localization_manager.hpp>
|
||||
|
||||
#include <hex/helpers/logger.hpp>
|
||||
#include <hex/helpers/menu_items.hpp>
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
|
||||
#include <loaders/dotnet/dotnet_loader.hpp>
|
||||
@@ -88,7 +89,7 @@ std::vector<const Script*> loadAllScripts() {
|
||||
hex::ContentRegistry::Interface::addMenuItemSubMenu({ "hex.builtin.menu.extras" }, 5000, [] {
|
||||
static bool menuJustOpened = true;
|
||||
|
||||
if (ImGui::BeginMenuEx("hex.script_loader.menu.run_script"_lang, ICON_VS_LIBRARY)) {
|
||||
if (menu::beginMenuEx("hex.script_loader.menu.run_script"_lang, ICON_VS_LIBRARY)) {
|
||||
if (menuJustOpened) {
|
||||
menuJustOpened = false;
|
||||
if (!updaterTask.isRunning()) {
|
||||
@@ -99,9 +100,9 @@ std::vector<const Script*> loadAllScripts() {
|
||||
}
|
||||
|
||||
if (updaterTask.isRunning()) {
|
||||
ImGuiExt::TextSpinner("hex.script_loader.menu.loading"_lang);
|
||||
menu::menuItem("hex.script_loader.menu.loading"_lang, Shortcut::None, false, false);
|
||||
} else if (scripts.empty()) {
|
||||
ImGui::TextUnformatted("hex.script_loader.menu.no_scripts"_lang);
|
||||
menu::menuItem("hex.script_loader.menu.no_scripts"_lang, Shortcut::None, false, false);
|
||||
}
|
||||
|
||||
for (const auto &script : scripts) {
|
||||
@@ -109,14 +110,14 @@ std::vector<const Script*> loadAllScripts() {
|
||||
if (background)
|
||||
continue;
|
||||
|
||||
if (ImGui::MenuItem(name.c_str(), loader->getTypeName().c_str())) {
|
||||
if (menu::menuItem(name.c_str())) {
|
||||
runnerTask = TaskManager::createTask("hex.script_loader.task.running", TaskManager::NoProgress, [entryPoint](auto&) {
|
||||
entryPoint();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
menu::endMenu();
|
||||
} else {
|
||||
menuJustOpened = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user