mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 19:17:57 -05:00
Kernel: Capture SharedMemory attributes at creation, not when mapping
This commit is contained in:
@ -48,7 +48,7 @@ static u32 next_touch_index;
|
||||
// * Set PadData.current_state.circle_right = 1 if current PadEntry.circle_pad_y <= -41
|
||||
|
||||
void Update() {
|
||||
SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer().ValueOr(nullptr));
|
||||
SharedMem* mem = reinterpret_cast<SharedMem*>(shared_mem->GetPointer());
|
||||
const PadState state = VideoCore::g_emu_window->GetPadState();
|
||||
|
||||
if (mem == nullptr) {
|
||||
@ -163,7 +163,9 @@ void Init() {
|
||||
AddService(new HID_U_Interface);
|
||||
AddService(new HID_SPVR_Interface);
|
||||
|
||||
shared_mem = SharedMemory::Create("HID:SharedMem");
|
||||
using Kernel::MemoryPermission;
|
||||
shared_mem = SharedMemory::Create(0x1000, MemoryPermission::ReadWrite,
|
||||
MemoryPermission::Read, "HID:SharedMem");
|
||||
|
||||
next_pad_index = 0;
|
||||
next_touch_index = 0;
|
||||
|
Reference in New Issue
Block a user