From 87cacbeed49facf18355c55cc93d0a2a0142be09 Mon Sep 17 00:00:00 2001 From: lizzie Date: Wed, 22 Oct 2025 04:53:40 +0200 Subject: [compat] HaikuOS port (#2805) Still had the issues with libusb, but that should get solved with the other PRs anyways Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2805 Reviewed-by: MaranBr Reviewed-by: crueter Co-authored-by: lizzie Co-committed-by: lizzie --- src/common/host_memory.cpp | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'src/common/host_memory.cpp') diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index 3838c12903..6e47fa286d 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -12,7 +12,7 @@ #include #include "common/dynamic_library.h" -#elif defined(__linux__) || defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__) // ^^^ Windows ^^^ vvv POSIX vvv +#else // ^^^ Windows ^^^ vvv POSIX vvv #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -394,7 +394,7 @@ private: std::unordered_map placeholder_host_pointers; ///< Placeholder backing offset }; -#elif defined(__linux__) || defined(__FreeBSD__) || defined(__sun__) || defined(__APPLE__) // ^^^ Windows ^^^ vvv POSIX vvv +#else // ^^^ Windows ^^^ vvv POSIX vvv #ifdef ARCHITECTURE_arm64 @@ -679,32 +679,7 @@ private: FreeRegionManager free_manager{}; }; -#else // ^^^ POSIX ^^^ vvv Generic vvv - -class HostMemory::Impl { -public: - explicit Impl([[maybe_unused]] size_t backing_size, [[maybe_unused]] size_t virtual_size) { - // This is just a place holder. - ASSERT_MSG(false, "Please implement fastmem in a proper way on your platform."); - } - - void Map(size_t virtual_offset, size_t host_offset, size_t length, MemoryPermission perm) {} - - void Unmap(size_t virtual_offset, size_t length) {} - - void Protect(size_t virtual_offset, size_t length, bool read, bool write, bool execute) {} - - bool ClearBackingRegion(size_t physical_offset, size_t length) { - return false; - } - - void EnableDirectMappedAddress() {} - - u8* backing_base{nullptr}; - u8* virtual_base{nullptr}; -}; - -#endif // ^^^ Generic ^^^ +#endif // ^^^ POSIX ^^^ HostMemory::HostMemory(size_t backing_size_, size_t virtual_size_) : backing_size(backing_size_), virtual_size(virtual_size_) { -- cgit v1.2.3