fix: Remaining compile errors

This commit is contained in:
WerWolv
2025-01-31 20:23:47 +01:00
parent e6ab2c3b7e
commit 8d1352ddff
24 changed files with 53 additions and 50 deletions

View File

@@ -36,8 +36,8 @@ macro(add_imhex_plugin)
# Add include directories and link libraries # Add include directories and link libraries
target_include_directories(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_INCLUDES}) target_include_directories(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_INCLUDES})
target_link_libraries(${IMHEX_PLUGIN_NAME} PUBLIC libimhex) target_link_libraries(${IMHEX_PLUGIN_NAME} PUBLIC ${IMHEX_PLUGIN_LIBRARIES})
target_link_libraries(${IMHEX_PLUGIN_NAME} PRIVATE ${FMT_LIBRARIES} imgui_all_includes libwolv ${IMHEX_PLUGIN_LIBRARIES}) target_link_libraries(${IMHEX_PLUGIN_NAME} PRIVATE libimhex ${FMT_LIBRARIES} imgui_all_includes libwolv)
addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl) addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl)
addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl-gen) addIncludesFromLibrary(${IMHEX_PLUGIN_NAME} libpl-gen)

View File

@@ -576,7 +576,7 @@ namespace hex {
namespace impl { namespace impl {
void add(std::unique_ptr<View> &&view); void add(std::unique_ptr<View> &&view);
const std::map<std::string, std::unique_ptr<View>>& getEntries(); const std::map<UnlocalizedString, std::unique_ptr<View>>& getEntries();
} }
@@ -1110,9 +1110,9 @@ namespace hex {
[[nodiscard]] const UnlocalizedString& getUnlocalizedName() const { return m_unlocalizedName; } [[nodiscard]] const UnlocalizedString& getUnlocalizedName() const { return m_unlocalizedName; }
protected: [[nodiscard]] static int DefaultTextInputFlags();
const static int TextInputFlags;
protected:
bool drawDefaultScalarEditingTextBox(u64 address, const char *format, ImGuiDataType dataType, u8 *data, ImGuiInputTextFlags flags) const; bool drawDefaultScalarEditingTextBox(u64 address, const char *format, ImGuiDataType dataType, u8 *data, ImGuiInputTextFlags flags) const;
bool drawDefaultTextEditingTextBox(u64 address, std::string &data, ImGuiInputTextFlags flags) const; bool drawDefaultTextEditingTextBox(u64 address, std::string &data, ImGuiInputTextFlags flags) const;

View File

@@ -189,43 +189,43 @@ namespace hex::gl {
T &getElement(int row,int col) { T &getElement(int row,int col) {
return this->mat[row*Columns+col]; return this->mat[row * Columns+col];
} }
Vector<T,Rows> getColumn(int col) { Vector<T,Rows> getColumn(int col) {
Vector<T,Rows> result; Vector<T,Rows> result;
for (size_t i = 0; i < Rows; i++) for (size_t i = 0; i < Rows; i++)
result[i] = this->mat[i*Columns+col]; result[i] = this->mat[i * Columns + col];
return result; return result;
} }
Vector<T,Columns> getRow(int row) { Vector<T,Columns> getRow(int row) {
Vector<T,Columns> result; Vector<T,Columns> result;
for (size_t i = 0; i < Columns; i++) for (size_t i = 0; i < Columns; i++)
result[i] = this->mat[row*Columns+i]; result[i] = this->mat[row * Columns+i];
return result; return result;
} }
void updateRow(int row, Vector<T,Columns> values) { void updateRow(int row, Vector<T,Columns> values) {
for (size_t i = 0; i < Columns; i++) for (size_t i = 0; i < Columns; i++)
this->mat[row*Columns+i] = values[i]; this->mat[row * Columns + i] = values[i];
} }
void updateColumn(int col, Vector<T,Rows> values) { void updateColumn(int col, Vector<T,Rows> values) {
for (size_t i = 0; i < Rows; i++) for (size_t i = 0; i < Rows; i++)
this->mat[i*Columns+col] = values[i]; this->mat[i * Columns + col] = values[i];
} }
void updateElement( int row,int col, T value) { void updateElement(int row, int col, T value) {
this->mat[row*Columns + col] = value; this->mat[row * Columns + col] = value;
} }
T &operator()( const unsigned&row, const unsigned&col) { T &operator()(const unsigned &row, const unsigned &col) {
return this->mat[row*Columns + col]; return this->mat[row * Columns + col];
} }
const T &operator()(const unsigned& row, const unsigned& col) const { const T &operator()(const unsigned &row, const unsigned &col) const {
return this->mat[row*Columns + col]; return this->mat[row * Columns + col];
} }
Matrix& operator=(const Matrix& A) { Matrix& operator=(const Matrix& A) {
@@ -243,7 +243,7 @@ namespace hex::gl {
for (size_t i = 0; i < Rows; i++) for (size_t i = 0; i < Rows; i++)
for (size_t j = 0; j < Columns; j++) for (size_t j = 0; j < Columns; j++)
result(i, j) = this->mat[i*Columns+j] + A(i, j); result(i, j) = this->mat[i * Columns + j] + A(i, j);
return result; return result;
} }
@@ -252,7 +252,7 @@ namespace hex::gl {
for (size_t i = 0; i < Rows; i++) for (size_t i = 0; i < Rows; i++)
for (size_t j = 0; j < Columns; j++) for (size_t j = 0; j < Columns; j++)
result(i, j) = this->mat[i*Columns+j] - A(i, j); result(i, j) = this->mat[i * Columns + j] - A(i, j);
return result; return result;
} }
@@ -269,7 +269,7 @@ namespace hex::gl {
Matrix t(0); Matrix t(0);
for (size_t i = 0; i < Columns; i++) for (size_t i = 0; i < Columns; i++)
for (size_t j = 0; j < Rows; j++) for (size_t j = 0; j < Rows; j++)
t.updateElement(i, j, this->mat[j*Rows+i]); t.updateElement(i, j, this->mat[j * Rows + i]);
return t; return t;
} }

View File

@@ -2,7 +2,10 @@
#if !defined(WINGDIAPI) #if !defined(WINGDIAPI)
#define WINGDIAPI extern "C" #define WINGDIAPI extern "C"
#define APIENTRY #endif
#if !defined(APIENTRY)
#define APIENTRY
#endif #endif
#if defined(OS_WEB) #if defined(OS_WEB)

View File

@@ -85,7 +85,7 @@ namespace hex::plugin::builtin {
private: private:
void executeQuery() { void executeQuery() {
m_requestTask = TaskManager::createBackgroundTask("hex.builtin.task.query_docs"_lang, [this, input = m_inputBuffer](Task &) { m_requestTask = TaskManager::createBackgroundTask("hex.builtin.task.query_docs", [this, input = m_inputBuffer](Task &) {
m_noAnswer = false; m_noAnswer = false;
for (auto space : { "xj7sbzGbHH260vbpZOu1", "WZzDdGjxmgMSIE3xly6o" }) { for (auto space : { "xj7sbzGbHH260vbpZOu1", "WZzDdGjxmgMSIE3xly6o" }) {
m_answer.clear(); m_answer.clear();

View File

@@ -57,7 +57,7 @@ namespace hex::plugin::builtin {
ContentRegistry::Settings::write<std::string>("hex.builtin.setting.general", "hex.builtin.setting.general.uuid", uuid); ContentRegistry::Settings::write<std::string>("hex.builtin.setting.general", "hex.builtin.setting.general.uuid", uuid);
} }
TaskManager::createBackgroundTask("hex.builtin.task.sending_statistics"_lang, [uuid](auto&) { TaskManager::createBackgroundTask("hex.builtin.task.sending_statistics", [uuid](auto&) {
// To avoid potentially flooding our database with lots of dead users // To avoid potentially flooding our database with lots of dead users
// from people just visiting the website, don't send telemetry data from // from people just visiting the website, don't send telemetry data from
// the web version // the web version
@@ -93,7 +93,7 @@ namespace hex::plugin::builtin {
} }
bool checkForUpdates() { bool checkForUpdates() {
TaskManager::createBackgroundTask("hex.builtin.task.check_updates"_lang, [](auto&) { checkForUpdatesSync(); }); TaskManager::createBackgroundTask("hex.builtin.task.check_updates", [](auto&) { checkForUpdatesSync(); });
return true; return true;
} }

View File

@@ -86,7 +86,7 @@ namespace hex::plugin::builtin {
this->processInputString(); this->processInputString();
if (!m_searchTask.isRunning() && !m_searchByteSequence.empty()) { if (!m_searchTask.isRunning() && !m_searchByteSequence.empty()) {
m_searchTask = TaskManager::createTask("hex.ui.common.processing"_lang, m_searchTask = TaskManager::createTask("hex.ui.common.processing",
ImHexApi::Provider::get()->getActualSize(), ImHexApi::Provider::get()->getActualSize(),
doSearch); doSearch);
} }

View File

@@ -367,7 +367,7 @@ namespace hex::plugin::builtin {
} }
m_changeEventAcknowledgementPending = true; m_changeEventAcknowledgementPending = true;
ui::BannerButton::open(ICON_VS_INFO, "hex.builtin.provider.file.reload_changes"_lang, ImColor(66, 104, 135), "hex.builtin.provider.file.reload_changes.reload", [this] { ui::BannerButton::open(ICON_VS_INFO, "hex.builtin.provider.file.reload_changes", ImColor(66, 104, 135), "hex.builtin.provider.file.reload_changes.reload", [this] {
this->close(); this->close();
(void)this->open(!m_loadedIntoMemory); (void)this->open(!m_loadedIntoMemory);

View File

@@ -151,7 +151,7 @@ namespace hex::plugin::builtin::recent {
} }
void updateRecentEntries() { void updateRecentEntries() {
TaskManager::createBackgroundTask("hex.builtin.task.updating_recents"_lang, [](auto&) { TaskManager::createBackgroundTask("hex.builtin.task.updating_recents", [](auto&) {
if (s_recentEntriesUpdating) if (s_recentEntriesUpdating)
return; return;

View File

@@ -110,7 +110,7 @@ namespace hex::plugin::builtin {
ImGuiExt::TextSpinner("hex.builtin.tools.file_tools.combiner.combining"_lang); ImGuiExt::TextSpinner("hex.builtin.tools.file_tools.combiner.combining"_lang);
} else { } else {
if (ImGui::Button("hex.builtin.tools.file_tools.combiner.combine"_lang)) { if (ImGui::Button("hex.builtin.tools.file_tools.combiner.combine"_lang)) {
combinerTask = TaskManager::createTask("hex.builtin.tools.file_tools.combiner.combining"_lang, 0, [](auto &task) { combinerTask = TaskManager::createTask("hex.builtin.tools.file_tools.combiner.combining", 0, [](auto &task) {
wolv::io::File output(outputPath, wolv::io::File::Mode::Create); wolv::io::File output(outputPath, wolv::io::File::Mode::Create);
if (!output.isValid()) { if (!output.isValid()) {

View File

@@ -48,7 +48,7 @@ namespace hex::plugin::builtin {
ImGui::BeginDisabled(selectedFile.empty()); ImGui::BeginDisabled(selectedFile.empty());
{ {
if (ImGui::Button("hex.builtin.tools.file_tools.shredder.shred"_lang)) { if (ImGui::Button("hex.builtin.tools.file_tools.shredder.shred"_lang)) {
shredderTask = TaskManager::createTask("hex.builtin.tools.file_tools.shredder.shredding"_lang, 0, [](auto &task) { shredderTask = TaskManager::createTask("hex.builtin.tools.file_tools.shredder.shredding", 0, [](auto &task) {
ON_SCOPE_EXIT { ON_SCOPE_EXIT {
selectedFile.clear(); selectedFile.clear();
}; };

View File

@@ -93,7 +93,7 @@ namespace hex::plugin::builtin {
ImGuiExt::TextSpinner("hex.builtin.tools.file_tools.splitter.picker.splitting"_lang); ImGuiExt::TextSpinner("hex.builtin.tools.file_tools.splitter.picker.splitting"_lang);
} else { } else {
if (ImGui::Button("hex.builtin.tools.file_tools.splitter.picker.split"_lang)) { if (ImGui::Button("hex.builtin.tools.file_tools.splitter.picker.split"_lang)) {
splitterTask = TaskManager::createTask("hex.builtin.tools.file_tools.splitter.picker.splitting"_lang, 0, [](auto &task) { splitterTask = TaskManager::createTask("hex.builtin.tools.file_tools.splitter.picker.splitting", 0, [](auto &task) {
ON_SCOPE_EXIT { ON_SCOPE_EXIT {
selectedFile.clear(); selectedFile.clear();
baseOutputPath.clear(); baseOutputPath.clear();

View File

@@ -59,7 +59,7 @@ namespace hex::plugin::builtin {
} }
void ViewDataInspector::updateInspectorRows() { void ViewDataInspector::updateInspectorRows() {
m_updateTask = TaskManager::createBackgroundTask("hex.builtin.task.updating_inspector"_lang, [this](auto &) { m_updateTask = TaskManager::createBackgroundTask("hex.builtin.task.updating_inspector", [this](auto &) {
this->updateInspectorRowsTask(); this->updateInspectorRowsTask();
}); });
} }

View File

@@ -537,7 +537,7 @@ namespace hex::plugin::builtin {
// Reset any potential node errors // Reset any potential node errors
workspace.currNodeError.reset(); workspace.currNodeError.reset();
m_evaluationTask = TaskManager::createTask("hex.builtin.task.evaluating_nodes"_lang, 0, [this, workspace = &workspace](Task& task) { m_evaluationTask = TaskManager::createTask("hex.builtin.task.evaluating_nodes", 0, [this, workspace = &workspace](Task& task) {
task.setInterruptCallback([]{ task.setInterruptCallback([]{
dp::Node::interrupt(); dp::Node::interrupt();
}); });

View File

@@ -550,7 +550,7 @@ namespace hex::plugin::builtin {
m_occurrenceTree->clear(); m_occurrenceTree->clear();
EventHighlightingChanged::post(); EventHighlightingChanged::post();
m_searchTask = TaskManager::createTask("hex.builtin.view.find.searching"_lang, searchRegion.getSize(), [this, settings = m_searchSettings, searchRegion](auto &task) { m_searchTask = TaskManager::createTask("hex.builtin.view.find.searching", searchRegion.getSize(), [this, settings = m_searchSettings, searchRegion](auto &task) {
auto provider = ImHexApi::Provider::get(); auto provider = ImHexApi::Provider::get();
switch (settings.mode) { switch (settings.mode) {
@@ -974,7 +974,7 @@ namespace hex::plugin::builtin {
m_filterTask.interrupt(); m_filterTask.interrupt();
if (!m_currFilter->empty()) { if (!m_currFilter->empty()) {
m_filterTask = TaskManager::createTask("hex.builtin.task.filtering_data"_lang, currOccurrences.size(), [this, provider, &currOccurrences](Task &task) { m_filterTask = TaskManager::createTask("hex.builtin.task.filtering_data", currOccurrences.size(), [this, provider, &currOccurrences](Task &task) {
u64 progress = 0; u64 progress = 0;
std::erase_if(currOccurrences, [this, provider, &task, &progress](const auto &region) { std::erase_if(currOccurrences, [this, provider, &task, &progress](const auto &region) {
task.update(progress); task.update(progress);

View File

@@ -521,7 +521,7 @@ namespace hex::plugin::builtin {
} }
[[nodiscard]] UnlocalizedString getTitle() const override { [[nodiscard]] UnlocalizedString getTitle() const override {
return "hex.builtin.view.hex_editor.menu.edit.paste.popup.title"_lang; return "hex.builtin.view.hex_editor.menu.edit.paste.popup.title";
} }
private: private:
@@ -737,7 +737,7 @@ namespace hex::plugin::builtin {
return; return;
fs::openFileBrowser(fs::DialogMode::Save, {}, [provider](const auto &path) { fs::openFileBrowser(fs::DialogMode::Save, {}, [provider](const auto &path) {
PopupBlockingTask::open(TaskManager::createTask("hex.builtin.task.saving_data"_lang, TaskManager::NoProgress, [=](Task &){ PopupBlockingTask::open(TaskManager::createTask("hex.builtin.task.saving_data", TaskManager::NoProgress, [=](Task &){
provider->saveAs(path); provider->saveAs(path);
})); }));
}); });
@@ -1196,7 +1196,7 @@ namespace hex::plugin::builtin {
ui::PopupFileChooser::open(basePaths, paths, std::vector<hex::fs::ItemFilter>{ {"Thingy Table File", "tbl"} }, false, ui::PopupFileChooser::open(basePaths, paths, std::vector<hex::fs::ItemFilter>{ {"Thingy Table File", "tbl"} }, false,
[this](const auto &path) { [this](const auto &path) {
TaskManager::createTask("hex.builtin.task.loading_encoding_file"_lang, 0, [this, path](auto&) { TaskManager::createTask("hex.builtin.task.loading_encoding_file", 0, [this, path](auto&) {
auto encoding = EncodingFile(EncodingFile::Type::Thingy, path); auto encoding = EncodingFile(EncodingFile::Type::Thingy, path);
ImHexApi::Provider::markDirty(); ImHexApi::Provider::markDirty();

View File

@@ -66,7 +66,7 @@ namespace hex::plugin::builtin {
} }
// Run analyzers for each section // Run analyzers for each section
analysis.task = TaskManager::createTask("hex.builtin.view.information.analyzing"_lang, analysis.informationSections.size(), [provider, &analysis](Task &task) { analysis.task = TaskManager::createTask("hex.builtin.view.information.analyzing", analysis.informationSections.size(), [provider, &analysis](Task &task) {
u32 progress = 0; u32 progress = 0;
for (const auto &section : analysis.informationSections) { for (const auto &section : analysis.informationSections) {
// Only process the section if it is enabled // Only process the section if it is enabled

View File

@@ -592,7 +592,7 @@ namespace hex::plugin::builtin {
auto code = m_textEditor.GetText(); auto code = m_textEditor.GetText();
EventPatternEditorChanged::post(code); EventPatternEditorChanged::post(code);
TaskManager::createBackgroundTask("hex.builtin.task.parsing_pattern"_lang, [this, code = std::move(code), provider](auto &){ TaskManager::createBackgroundTask("hex.builtin.task.parsing_pattern", [this, code = std::move(code), provider](auto &){
this->parsePattern(code, provider); this->parsePattern(code, provider);
if (m_runAutomatically) if (m_runAutomatically)
@@ -1531,7 +1531,7 @@ namespace hex::plugin::builtin {
if (m_shouldAnalyze) { if (m_shouldAnalyze) {
m_shouldAnalyze = false; m_shouldAnalyze = false;
m_analysisTask = TaskManager::createBackgroundTask("hex.builtin.task.analyzing_data"_lang, [this, provider](const Task &task) { m_analysisTask = TaskManager::createBackgroundTask("hex.builtin.task.analyzing_data", [this, provider](const Task &task) {
if (!m_autoLoadPatterns) if (!m_autoLoadPatterns)
return; return;
@@ -1834,7 +1834,7 @@ namespace hex::plugin::builtin {
m_textEditor.SetText(code); m_textEditor.SetText(code);
m_sourceCode.set(provider, code); m_sourceCode.set(provider, code);
TaskManager::createBackgroundTask("hex.builtin.task.parsing_pattern"_lang, [this, code, provider](auto&) { this->parsePattern(code, provider); }); TaskManager::createBackgroundTask("hex.builtin.task.parsing_pattern", [this, code, provider](auto&) { this->parsePattern(code, provider); });
} }
} }
@@ -1900,7 +1900,7 @@ namespace hex::plugin::builtin {
EventHighlightingChanged::post(); EventHighlightingChanged::post();
TaskManager::createTask("hex.builtin.view.pattern_editor.evaluating"_lang, TaskManager::NoProgress, [this, code, provider](auto &task) { TaskManager::createTask("hex.builtin.view.pattern_editor.evaluating", TaskManager::NoProgress, [this, code, provider](auto &task) {
auto lock = std::scoped_lock(ContentRegistry::PatternLanguage::getRuntimeLock()); auto lock = std::scoped_lock(ContentRegistry::PatternLanguage::getRuntimeLock());
auto &runtime = ContentRegistry::PatternLanguage::getRuntime(); auto &runtime = ContentRegistry::PatternLanguage::getRuntime();

View File

@@ -336,7 +336,7 @@ namespace hex::plugin::builtin {
} }
void ViewStore::updateAll() { void ViewStore::updateAll() {
m_updateAllTask = TaskManager::createTask("hex.builtin.task.updating_store"_lang, m_updateCount, [this](auto &task) { m_updateAllTask = TaskManager::createTask("hex.builtin.task.updating_store", m_updateCount, [this](auto &task) {
for (auto &category : m_categories) { for (auto &category : m_categories) {
for (auto &entry : category.entries) { for (auto &entry : category.entries) {
if (entry.hasUpdate) { if (entry.hasUpdate) {

View File

@@ -99,7 +99,7 @@ namespace hex::plugin::builtin {
} }
} }
TaskManager::createBackgroundTask("hex.builtin.task.uploading_crash"_lang, [path = m_logFilePath, data](auto&){ TaskManager::createBackgroundTask("hex.builtin.task.uploading_crash", [path = m_logFilePath, data](auto&){
HttpRequest request("POST", ImHexApiURL + std::string("/crash_upload")); HttpRequest request("POST", ImHexApiURL + std::string("/crash_upload"));
request.uploadFile(std::vector<u8>(data.begin(), data.end()), "file", path.filename()).wait(); request.uploadFile(std::vector<u8>(data.begin(), data.end()), "file", path.filename()).wait();
}); });
@@ -679,7 +679,7 @@ namespace hex::plugin::builtin {
auto allowNetworking = ContentRegistry::Settings::read<bool>("hex.builtin.setting.general", "hex.builtin.setting.general.network_interface", false) auto allowNetworking = ContentRegistry::Settings::read<bool>("hex.builtin.setting.general", "hex.builtin.setting.general.network_interface", false)
&& ContentRegistry::Settings::read<int>("hex.builtin.setting.general", "hex.builtin.setting.general.server_contact", 0) != 0; && ContentRegistry::Settings::read<int>("hex.builtin.setting.general", "hex.builtin.setting.general.server_contact", 0) != 0;
if (!s_infoBannerTexture->isValid() && allowNetworking) { if (!s_infoBannerTexture->isValid() && allowNetworking) {
TaskManager::createBackgroundTask("hex.builtin.task.loading_banner"_lang, [](auto&) { TaskManager::createBackgroundTask("hex.builtin.task.loading_banner", [](auto&) {
HttpRequest request("GET", HttpRequest request("GET",
ImHexApiURL + hex::format("/info/{}/image", hex::toLower(ImHexApi::System::getOSName()))); ImHexApiURL + hex::format("/info/{}/image", hex::toLower(ImHexApi::System::getOSName())));

View File

@@ -94,7 +94,7 @@ namespace hex::plugin::diffing {
void ViewDiff::analyze(prv::Provider *providerA, prv::Provider *providerB) { void ViewDiff::analyze(prv::Provider *providerA, prv::Provider *providerB) {
auto commonSize = std::max(providerA->getActualSize(), providerB->getActualSize()); auto commonSize = std::max(providerA->getActualSize(), providerB->getActualSize());
m_diffTask = TaskManager::createTask("hex.diffing.view.diff.task.diffing"_lang, commonSize, [this, providerA, providerB](Task &) { m_diffTask = TaskManager::createTask("hex.diffing.view.diff.task.diffing", commonSize, [this, providerA, providerB](Task &) {
auto differences = m_algorithm->analyze(providerA, providerB); auto differences = m_algorithm->analyze(providerA, providerB);
auto providers = ImHexApi::Provider::getProviders(); auto providers = ImHexApi::Provider::getProviders();

View File

@@ -100,7 +100,7 @@ namespace hex::plugin::disasm {
void ViewDisassembler::exportToFile() { void ViewDisassembler::exportToFile() {
const auto provider = ImHexApi::Provider::get(); const auto provider = ImHexApi::Provider::get();
TaskManager::createTask("hex.ui.common.processing"_lang, TaskManager::NoProgress, [this, provider](auto &) { TaskManager::createTask("hex.ui.common.processing", TaskManager::NoProgress, [this, provider](auto &) {
TaskManager::doLater([this, provider] { TaskManager::doLater([this, provider] {
fs::openFileBrowser(fs::DialogMode::Save, {}, [this, provider](const std::fs::path &path) { fs::openFileBrowser(fs::DialogMode::Save, {}, [this, provider](const std::fs::path &path) {
auto p = path; auto p = path;

View File

@@ -92,7 +92,7 @@ std::vector<const Script*> loadAllScripts() {
if (menuJustOpened) { if (menuJustOpened) {
menuJustOpened = false; menuJustOpened = false;
if (!updaterTask.isRunning()) { if (!updaterTask.isRunning()) {
updaterTask = TaskManager::createBackgroundTask("hex.script_loader.task.updating"_lang, [] (auto&) { updaterTask = TaskManager::createBackgroundTask("hex.script_loader.task.updating", [] (auto&) {
scripts = loadAllScripts(); scripts = loadAllScripts();
}); });
} }
@@ -110,7 +110,7 @@ std::vector<const Script*> loadAllScripts() {
continue; continue;
if (ImGui::MenuItem(name.c_str(), loader->getTypeName().c_str())) { if (ImGui::MenuItem(name.c_str(), loader->getTypeName().c_str())) {
runnerTask = TaskManager::createTask("hex.script_loader.task.running"_lang, TaskManager::NoProgress, [entryPoint](auto&) { runnerTask = TaskManager::createTask("hex.script_loader.task.running", TaskManager::NoProgress, [entryPoint](auto&) {
entryPoint(); entryPoint();
}); });
} }
@@ -124,7 +124,7 @@ std::vector<const Script*> loadAllScripts() {
return !runnerTask.isRunning(); return !runnerTask.isRunning();
}); });
updaterTask = TaskManager::createBackgroundTask("hex.script_loader.task.updating"_lang, [] (auto&) { updaterTask = TaskManager::createBackgroundTask("hex.script_loader.task.updating", [] (auto&) {
scripts = loadAllScripts(); scripts = loadAllScripts();
}); });
} }

View File

@@ -299,7 +299,7 @@ namespace hex::plugin::windows {
if (m_transmitting) if (m_transmitting)
return; return;
TaskManager::createBackgroundTask("hex.windows.view.tty_console.task.transmitting"_lang, [&, this](auto&) { TaskManager::createBackgroundTask("hex.windows.view.tty_console.task.transmitting", [&, this](auto&) {
OVERLAPPED overlapped = { }; OVERLAPPED overlapped = { };
overlapped.hEvent = ::CreateEvent(nullptr, true, false, nullptr); overlapped.hEvent = ::CreateEvent(nullptr, true, false, nullptr);