mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
clang-format
This commit is contained in:
parent
46b28fd25b
commit
3c8bb4bc92
@ -251,13 +251,13 @@ uintptr_t IOFile::GetFileMapping() {
|
|||||||
HANDLE mapping = nullptr;
|
HANDLE mapping = nullptr;
|
||||||
|
|
||||||
if (file_access_mode == FileAccessMode::ReadWrite) {
|
if (file_access_mode == FileAccessMode::ReadWrite) {
|
||||||
mapping = CreateFileMapping2(hfile, NULL, FILE_MAP_WRITE, PAGE_READWRITE, SEC_COMMIT,
|
mapping = CreateFileMapping2(hfile, NULL, FILE_MAP_WRITE, PAGE_READWRITE, SEC_COMMIT, 0,
|
||||||
0, NULL, NULL, 0);
|
NULL, NULL, 0);
|
||||||
} else {
|
} else {
|
||||||
mapping = CreateFileMapping2(hfile, NULL, FILE_MAP_READ, PAGE_READONLY, SEC_COMMIT,
|
mapping = CreateFileMapping2(hfile, NULL, FILE_MAP_READ, PAGE_READONLY, SEC_COMMIT, 0, NULL,
|
||||||
0, NULL, NULL, 0);
|
NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_mapping = std::bit_cast<uintptr_t>(mapping);
|
file_mapping = std::bit_cast<uintptr_t>(mapping);
|
||||||
ASSERT_MSG(file_mapping, "{}", Common::GetLastErrorMsg());
|
ASSERT_MSG(file_mapping, "{}", Common::GetLastErrorMsg());
|
||||||
return file_mapping;
|
return file_mapping;
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/error.h"
|
#include "common/error.h"
|
||||||
#include "core/address_space.h"
|
#include "core/address_space.h"
|
||||||
#include "core/memory.h"
|
|
||||||
#include "core/libraries/kernel/memory_management.h"
|
#include "core/libraries/kernel/memory_management.h"
|
||||||
|
#include "core/memory.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@ -338,8 +338,10 @@ void* AddressSpace::Map(VAddr virtual_addr, size_t size, u64 alignment, PAddr ph
|
|||||||
is_exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE);
|
is_exec ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* AddressSpace::MapFile(VAddr virtual_addr, size_t size, size_t offset, u32 prot, uintptr_t fd) {
|
void* AddressSpace::MapFile(VAddr virtual_addr, size_t size, size_t offset, u32 prot,
|
||||||
return impl->Map(virtual_addr, offset, size, ToWindowsProt(std::bit_cast<Core::MemoryProt>(prot)), fd);
|
uintptr_t fd) {
|
||||||
|
return impl->Map(virtual_addr, offset, size,
|
||||||
|
ToWindowsProt(std::bit_cast<Core::MemoryProt>(prot)), fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressSpace::Unmap(VAddr virtual_addr, size_t size, bool has_backing) {
|
void AddressSpace::Unmap(VAddr virtual_addr, size_t size, bool has_backing) {
|
||||||
|
Loading…
Reference in New Issue
Block a user