diff --git a/app/src/main/cpp/skyline/gpu/memory_manager.cpp b/app/src/main/cpp/skyline/gpu/memory_manager.cpp index 8707f85a..2f4bafbe 100644 --- a/app/src/main/cpp/skyline/gpu/memory_manager.cpp +++ b/app/src/main/cpp/skyline/gpu/memory_manager.cpp @@ -118,7 +118,7 @@ namespace skyline::gpu::vmm { } u64 MemoryManager::MapFixed(u64 address, u8 *pointer, u64 size) { - if (!util::IsAligned(pointer, constant::GpuPageSize)) + if (!util::IsAligned(address, constant::GpuPageSize)) return false; size = util::AlignUp(size, constant::GpuPageSize); diff --git a/app/src/main/cpp/skyline/services/nvdrv/devices/nvmap.cpp b/app/src/main/cpp/skyline/services/nvdrv/devices/nvmap.cpp index 839895f8..c48375c6 100644 --- a/app/src/main/cpp/skyline/services/nvdrv/devices/nvmap.cpp +++ b/app/src/main/cpp/skyline/services/nvdrv/devices/nvmap.cpp @@ -80,7 +80,7 @@ namespace skyline::service::nvdrv::device { std::unique_lock lock(mapMutex); try { - auto &object{maps.at(data.handle)}; + auto &object{maps.at(data.handle - 1)}; if (object.use_count() > 1) { data.pointer = object->pointer; data.flags = 0x0;