mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
Compare commits
18 Commits
feature/we
...
v1.37.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f112123d39 | ||
|
|
1a1ef9e7e0 | ||
|
|
39543fbda8 | ||
|
|
835863523b | ||
|
|
e6c8c69fda | ||
|
|
e2d30eeba2 | ||
|
|
1da82d1403 | ||
|
|
73b9df24cf | ||
|
|
f93e1194d6 | ||
|
|
677cff244d | ||
|
|
8d88e328fa | ||
|
|
acb5ef561d | ||
|
|
444b5219e2 | ||
|
|
a4c7e0db90 | ||
|
|
f4e1824b7b | ||
|
|
fcb5e18102 | ||
|
|
70d4e21c4b | ||
|
|
2e2d5d31bc |
@@ -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
|
||||
|
||||
2
lib/external/disassembler
vendored
2
lib/external/disassembler
vendored
Submodule lib/external/disassembler updated: f9aa3ebc94...a2217dd3bc
2
lib/external/libwolv
vendored
2
lib/external/libwolv
vendored
Submodule lib/external/libwolv updated: 4b42068eca...00021679c2
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
Submodule lib/external/pattern_language updated: 69b71a2c43...72e9b93c8f
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ namespace hex {
|
||||
auto ¤tFont = 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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": "헥스",
|
||||
|
||||
@@ -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": "设置页面大小",
|
||||
|
||||
@@ -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": "十六進位",
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -34,8 +34,6 @@ namespace hex::plugin::disasm {
|
||||
}
|
||||
|
||||
ViewDisassembler::~ViewDisassembler() {
|
||||
EventDataChanged::unsubscribe(this);
|
||||
EventRegionSelected::unsubscribe(this);
|
||||
EventProviderDeleted::unsubscribe(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user