feat: Added limited support for the process memory provider to macOS

This commit is contained in:
WerWolv
2024-06-07 19:17:14 +02:00
parent 4540e1b561
commit de8465a8f4
6 changed files with 84 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#if defined(OS_WINDOWS) || (defined(OS_LINUX) && !defined(OS_FREEBSD))
#if !defined(OS_FREEBSD)
#include <hex/providers/provider.hpp>
#include <hex/api/localization_manager.hpp>
@@ -28,9 +28,9 @@ namespace hex::plugin::builtin {
~ProcessMemoryProvider() override = default;
[[nodiscard]] bool isAvailable() const override {
#ifdef _WIN32
#if defined(OS_WINDOWS)
return m_processHandle != nullptr;
#elif __linux__
#else
return m_processId != -1;
#endif
}
@@ -102,9 +102,9 @@ namespace hex::plugin::builtin {
return hex::containsIgnoreCase(memoryRegion.name, search);
});
#ifdef _WIN32
#if defined(OS_WINDOWS)
HANDLE m_processHandle = nullptr;
#elif __linux__
#else
pid_t m_processId = -1;
#endif