aboutsummaryrefslogtreecommitdiff
path: root/src/common/host_memory.h
diff options
context:
space:
mode:
authorlizzie <lizzie@eden-emu.dev>2026-06-15 22:05:42 +0200
committercrueter <crueter@eden-emu.dev>2026-06-15 22:05:42 +0200
commit561adac0af563dc42ad5672aaf92e8c2001e98cc (patch)
treeabeea70b07d41e6b2c0c91789bc6611fae14bc1e /src/common/host_memory.h
parent62ef8b15fd08c9ca5a7a347fbf70f2e2dc6c282e (diff)
[common] fallback to VirtualBuffer if we can't use file mappings (#4005)
fixes: - windows 8.1 - windows 7 - managarm - openorbis Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4005 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/common/host_memory.h')
-rw-r--r--src/common/host_memory.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/host_memory.h b/src/common/host_memory.h
index 8dd30aa9de..24f4670732 100644
--- a/src/common/host_memory.h
+++ b/src/common/host_memory.h
@@ -1,4 +1,4 @@
-// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
@@ -7,6 +7,7 @@
#pragma once
#include <memory>
+#include <optional>
#include "common/common_funcs.h"
#include "common/common_types.h"
#include "common/virtual_buffer.h"
@@ -76,12 +77,16 @@ private:
size_t backing_size{};
size_t virtual_size{};
+#if !(defined(__OPENORBIS__) || defined(__managarm__))
// Low level handler for the platform dependent memory routines
class Impl;
std::unique_ptr<Impl> impl;
+#endif
u8* backing_base{};
u8* virtual_base{};
size_t virtual_base_offset{};
+ // Windows requires it for kernels whom lack proper support for some functions!
+ std::optional<Common::VirtualBuffer<u8>> fallback_buffer;
};
} // namespace Common