Compare commits

...

18 Commits

Author SHA1 Message Date
WerWolv
f112123d39 build: Bumped version to 1.37.1 2025-02-18 10:47:51 +01:00
WerWolv
1a1ef9e7e0 fix: Pattern Editor losing focus during auto evaluation
Fixes #2122
2025-02-18 10:27:10 +01:00
WerWolv
39543fbda8 build: Updated dependencies 2025-02-18 10:26:54 +01:00
WerWolv
835863523b build: Get rid of unused Toolchain file warning 2025-02-17 13:19:41 +01:00
WerWolv
e6c8c69fda fix: Remove unused event unsubscribes in disassembler 2025-02-17 13:07:22 +01:00
WerWolv
e2d30eeba2 fix: Crash when setting invalid font 2025-02-17 13:07:15 +01:00
WerWolv
1da82d1403 impr: Added missing ellipsis on Edit options 2025-02-17 11:21:43 +01:00
WerWolv
73b9df24cf fix: Closing one view breaking all other views 2025-02-17 10:17:23 +01:00
WerWolv
f93e1194d6 fix: Crash when loading process memory provider from project 2025-02-17 10:17:13 +01:00
WerWolv
677cff244d fix: Make sure fps counter values are initialized to zero 2025-02-16 23:46:20 +01:00
WerWolv
8d88e328fa fix: Don't execute EventDPIChanged multiple times 2025-02-16 22:53:35 +01:00
WerWolv
acb5ef561d fix: Wrong native scaling on Wayland 2025-02-16 21:55:38 +01:00
WerWolv
444b5219e2 fix: Crash when custom disassembler returns no bytes 2025-02-16 21:11:19 +01:00
WerWolv
a4c7e0db90 patterns: Updated pattern language 2025-02-16 21:06:14 +01:00
WerWolv
f4e1824b7b fix: Pattern editor being shifted to the left on evaluate 2025-02-16 20:53:29 +01:00
WerWolv
fcb5e18102 fix: Pattern console log logic 2025-02-16 20:53:20 +01:00
WerWolv
70d4e21c4b fix: Don't parse version string on every call 2025-02-16 20:53:12 +01:00
WerWolv
2e2d5d31bc build: Updated libwolv 2025-02-16 20:52:57 +01:00
23 changed files with 44 additions and 32 deletions

View File

@@ -1 +1 @@
1.37.0
1.37.1

View File

@@ -381,6 +381,10 @@ endfunction()
macro(configureCMake)
message(STATUS "Configuring ImHex v${IMHEX_VERSION}")
if (DEFINED CMAKE_TOOLCHAIN_FILE)
message(STATUS "Using toolchain file: \"${CMAKE_TOOLCHAIN_FILE}\"")
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Enable position independent code for all targets" FORCE)
# Configure use of recommended build tools

View File

@@ -872,7 +872,8 @@ namespace hex {
SemanticVersion getImHexVersion() {
#if defined IMHEX_VERSION
return SemanticVersion(IMHEX_VERSION);
static auto version = SemanticVersion(IMHEX_VERSION);
return version;
#else
return {};
#endif

View File

@@ -871,8 +871,10 @@ void TextEditor::SetFocus() {
SetSelection(mInteractiveStart, mInteractiveEnd, mSelectionMode);
ResetCursorBlinkTime();
EnsureCursorVisible();
ImGui::SetKeyboardFocusHere(-1);
mUpdateFocus = false;
if (!this->mReadOnly) {
ImGui::SetKeyboardFocusHere(-1);
mUpdateFocus = false;
}
}
void TextEditor::RenderText(const char *aTitle, const ImVec2 &lineNumbersStartPos, const ImVec2 &textEditorSize) {

View File

@@ -492,7 +492,9 @@ namespace hex::init {
meanScale = 1.0F;
#endif
meanScale /= hex::ImHexApi::System::getBackingScaleFactor();
#if !defined(OS_LINUX)
meanScale /= hex::ImHexApi::System::getBackingScaleFactor();
#endif
ImHexApi::System::impl::setGlobalScale(meanScale);
ImHexApi::System::impl::setNativeScale(meanScale);

View File

@@ -70,6 +70,9 @@ namespace hex {
const auto newScale = LOWORD(wParam) / 96.0F;
const auto oldScale = ImHexApi::System::getNativeScale();
if (u32(oldScale * 10) == u32(newScale * 10))
break;
EventDPIChanged::post(oldScale, newScale);
ImHexApi::System::impl::setNativeScale(newScale);

View File

@@ -343,7 +343,7 @@ namespace hex {
auto &currentFont = ImGui::GetIO().Fonts;
for (const auto &[name, font] : fontDefinitions) {
// If the texture for this atlas has been built already, don't do it again
if (font == nullptr || font->ContainerAtlas->TexID != 0)
if (font == nullptr || font->ContainerAtlas == nullptr || font->ContainerAtlas->TexID != 0)
continue;
currentFont = font->ContainerAtlas;

View File

@@ -781,8 +781,8 @@
"hex.builtin.view.hex_editor.menu.file.load_encoding_file": "Benutzerdefinierte Enkodierung laden...",
"hex.builtin.view.hex_editor.menu.file.save": "Speichern",
"hex.builtin.view.hex_editor.menu.file.save_as": "Speichern unter...",
"hex.builtin.view.hex_editor.menu.file.search": "Suchen",
"hex.builtin.view.hex_editor.menu.edit.select": "Auswählen",
"hex.builtin.view.hex_editor.menu.file.search": "Suchen...",
"hex.builtin.view.hex_editor.menu.edit.select": "Auswählen...",
"hex.builtin.view.hex_editor.name": "Hex Editor",
"hex.builtin.view.hex_editor.search.find": "Suchen",
"hex.builtin.view.hex_editor.search.hex": "Hex",

View File

@@ -850,7 +850,7 @@
"hex.builtin.view.hex_editor.menu.file.save": "Save",
"hex.builtin.view.hex_editor.menu.file.save_as": "Save As...",
"hex.builtin.view.hex_editor.menu.file.search": "Search...",
"hex.builtin.view.hex_editor.menu.edit.select": "Select",
"hex.builtin.view.hex_editor.menu.edit.select": "Select...",
"hex.builtin.view.hex_editor.name": "Hex editor",
"hex.builtin.view.hex_editor.search.find": "Find",
"hex.builtin.view.hex_editor.search.hex": "Hex",

View File

@@ -777,8 +777,8 @@
"hex.builtin.view.hex_editor.menu.file.load_encoding_file": "Cargar codificación personalizada...",
"hex.builtin.view.hex_editor.menu.file.save": "Guardar",
"hex.builtin.view.hex_editor.menu.file.save_as": "Guardar como...",
"hex.builtin.view.hex_editor.menu.file.search": "Buscar",
"hex.builtin.view.hex_editor.menu.edit.select": "Seleccionar",
"hex.builtin.view.hex_editor.menu.file.search": "Buscar...",
"hex.builtin.view.hex_editor.menu.edit.select": "Seleccionar...",
"hex.builtin.view.hex_editor.name": "Editor hexadecimal",
"hex.builtin.view.hex_editor.search.find": "Buscar",
"hex.builtin.view.hex_editor.search.hex": "Hexadecimal",

View File

@@ -778,8 +778,8 @@
"hex.builtin.view.hex_editor.menu.file.load_encoding_file": "Saját kódolás betöltése...",
"hex.builtin.view.hex_editor.menu.file.save": "Mentés",
"hex.builtin.view.hex_editor.menu.file.save_as": "Mentés másként...",
"hex.builtin.view.hex_editor.menu.file.search": "Keresés",
"hex.builtin.view.hex_editor.menu.edit.select": "Kijelölés",
"hex.builtin.view.hex_editor.menu.file.search": "Keresés...",
"hex.builtin.view.hex_editor.menu.edit.select": "Kijelölés...",
"hex.builtin.view.hex_editor.name": "Hex szerkesztő",
"hex.builtin.view.hex_editor.search.find": "Kereső",
"hex.builtin.view.hex_editor.search.hex": "Hex",

View File

@@ -777,8 +777,8 @@
"hex.builtin.view.hex_editor.menu.file.load_encoding_file": "사용자 정의 인코딩 불러오기...",
"hex.builtin.view.hex_editor.menu.file.save": "저장",
"hex.builtin.view.hex_editor.menu.file.save_as": "다른 이름으로 저장...",
"hex.builtin.view.hex_editor.menu.file.search": "검색",
"hex.builtin.view.hex_editor.menu.edit.select": "선택",
"hex.builtin.view.hex_editor.menu.file.search": "검색...",
"hex.builtin.view.hex_editor.menu.edit.select": "선택...",
"hex.builtin.view.hex_editor.name": "헥스 편집기",
"hex.builtin.view.hex_editor.search.find": "찾기",
"hex.builtin.view.hex_editor.search.hex": "헥스",

View File

@@ -849,7 +849,7 @@
"hex.builtin.view.hex_editor.menu.edit.paste_all": "粘贴全部",
"hex.builtin.view.hex_editor.menu.edit.remove": "删除……",
"hex.builtin.view.hex_editor.menu.edit.resize": "修改大小……",
"hex.builtin.view.hex_editor.menu.edit.select": "选择",
"hex.builtin.view.hex_editor.menu.edit.select": "选择……",
"hex.builtin.view.hex_editor.menu.edit.select_all": "全选",
"hex.builtin.view.hex_editor.menu.edit.set_base": "设置基地址",
"hex.builtin.view.hex_editor.menu.edit.set_page_size": "设置页面大小",

View File

@@ -777,8 +777,8 @@
"hex.builtin.view.hex_editor.menu.file.load_encoding_file": "載入自訂編碼...",
"hex.builtin.view.hex_editor.menu.file.save": "儲存",
"hex.builtin.view.hex_editor.menu.file.save_as": "另存為...",
"hex.builtin.view.hex_editor.menu.file.search": "搜尋",
"hex.builtin.view.hex_editor.menu.edit.select": "選取",
"hex.builtin.view.hex_editor.menu.file.search": "搜尋...",
"hex.builtin.view.hex_editor.menu.edit.select": "選取...",
"hex.builtin.view.hex_editor.name": "十六進位編輯器",
"hex.builtin.view.hex_editor.search.find": "尋找",
"hex.builtin.view.hex_editor.search.hex": "十六進位",

View File

@@ -33,6 +33,9 @@
namespace hex::plugin::builtin {
bool ProcessMemoryProvider::open() {
if (m_selectedProcess == nullptr)
return false;
#if defined(OS_WINDOWS)
m_processHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, m_selectedProcess->id);
if (m_processHandle == nullptr)

View File

@@ -52,9 +52,10 @@ namespace hex::plugin::builtin {
return false;
EventProviderClosing::subscribe(this, [this](const prv::Provider *provider, bool*) {
if (m_provider == provider)
if (m_provider == provider) {
ImHexApi::Provider::remove(this, false);
m_provider = nullptr;
m_provider = nullptr;
}
});
return true;

View File

@@ -248,7 +248,7 @@ namespace hex::plugin::builtin {
}, nullptr);
ImPlot::SetupAxisTicks(ImAxis_Y1, 0, largestFrameTime * 1.25F, 3);
static std::vector<double> values(100);
static std::vector<double> values(100, 0.0);
values.push_back(ImHexApi::System::getLastFrameTime());
if (values.size() > 100)

View File

@@ -1089,10 +1089,6 @@ namespace hex::plugin::builtin {
ImGui::PopFont();
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + ImGui::GetStyle().FramePadding.y + 1_scaled);
if (m_patternEvaluating && m_runningEvaluators == 0) {
m_patternEvaluating = false;
m_textEditor.JumpToLine();
}
}
void ViewPatternEditor::drawEnvVars(ImVec2 size, std::list<EnvVar> &envVars) {
@@ -1953,7 +1949,8 @@ namespace hex::plugin::builtin {
runtime.setLogCallback([this, provider](auto level, auto message) {
std::scoped_lock lock(m_logMutex);
for (auto line : wolv::util::splitString(message, "\n")) {
auto lines = wolv::util::splitString(message, "\n");
for (auto &line : lines) {
if (!wolv::util::trim(line).empty()) {
switch (level) {
using enum pl::core::LogConsole::Level;

View File

@@ -46,7 +46,8 @@ namespace hex::plugin::disasm {
for (u8 byte : instruction.bytes)
disassembly.bytes += hex::format("{0:02X} ", byte);
disassembly.bytes.pop_back();
if (!disassembly.bytes.empty())
disassembly.bytes.pop_back();
return disassembly;
}

View File

@@ -34,8 +34,6 @@ namespace hex::plugin::disasm {
}
ViewDisassembler::~ViewDisassembler() {
EventDataChanged::unsubscribe(this);
EventRegionSelected::unsubscribe(this);
EventProviderDeleted::unsubscribe(this);
}