Skip to content

Commit

Permalink
Fix error function CreateView and ReleaseSpace for another platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Apr 5, 2024
1 parent d42a939 commit b8c983f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Common/MemArena.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MemArena {
public:
static size_t roundup(size_t x);
bool GrabMemSpace(size_t size);
void ReleaseSpace() const;
void ReleaseSpace();
void *CreateView(s64 offset, size_t size, void *base = 0) const;
static void ReleaseView(s64 offset, void *view, size_t size);

Expand Down
2 changes: 1 addition & 1 deletion Common/MemArenaAndroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void MemArena::ReleaseSpace() {
close(fd);
}

void *MemArena::CreateView(s64 offset, size_t size, void *base) {
void *MemArena::CreateView(s64 offset, size_t size, void *base) const {
void *retval = mmap(base, size, PROT_READ | PROT_WRITE, MAP_SHARED | ((base == 0) ? 0 : MAP_FIXED), fd, offset);
if (retval == MAP_FAILED) {
NOTICE_LOG(MEMMAP, "mmap on ashmem (fd: %d) failed", (int)fd);
Expand Down
2 changes: 1 addition & 1 deletion Common/MemArenaDarwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void MemArena::ReleaseSpace() {
vm_mem = 0;
}

void *MemArena::CreateView(s64 offset, size_t size, void *base) {
void *MemArena::CreateView(s64 offset, size_t size, void *base) const {
mach_port_t self = mach_task_self();
vm_address_t target = (vm_address_t)base;
uint64_t mask = 0;
Expand Down
2 changes: 1 addition & 1 deletion Common/MemArenaHorizon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void MemArena::ReleaseSpace() {
memorySrcBase = 0;
}

void *MemArena::CreateView(s64 offset, size_t size, void *base) {
void *MemArena::CreateView(s64 offset, size_t size, void *base) const {
Result rc = svcMapProcessMemory(base, envGetOwnProcessHandle(), (u64)(memoryCodeBase + offset), size);
if (R_FAILED(rc)) {
printf("Fatal error creating the view... base: %p offset: %p size: %p src: %p err: %d\n",
Expand Down
2 changes: 1 addition & 1 deletion Common/MemArenaPosix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool MemArena::GrabMemSpace(size_t size) {
return true;
}

void MemArena::ReleaseSpace() const {
void MemArena::ReleaseSpace() {
#ifndef NO_MMAP
close(fd);
#endif
Expand Down
2 changes: 1 addition & 1 deletion Common/MemArenaWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void MemArena::ReleaseSpace() {
hMemoryMapping = 0;
}

void *MemArena::CreateView(s64 offset, size_t size, void *viewbase) {
void *MemArena::CreateView(s64 offset, size_t size, void *viewbase) const {
size = roundup(size);
#if PPSSPP_PLATFORM(UWP)
// We just grabbed some RAM before using RESERVE. This commits it.
Expand Down
2 changes: 1 addition & 1 deletion Core/Dialog/SavedataParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class SavedataParam
void SetFileInfo(int idx, PSPFileInfo &info, const std::string &saveName, const std::string &saveDir = "");
void SetFileInfo(SaveFileInfo &saveInfo, PSPFileInfo &info, const std::string &saveName, const std::string &saveDir = "");
void ClearFileInfo(SaveFileInfo &saveInfo, const std::string &saveName);
static static PSPFileInfo GetSaveInfo(const std::string &saveDir);
static PSPFileInfo GetSaveInfo(const std::string &saveDir);

int LoadSaveData(SceUtilitySavedataParam *param, const std::string &saveDirName, const std::string& dirPath, bool secureMode);
static u32 LoadCryptedSave(SceUtilitySavedataParam *param, u8 *data, const u8 *saveData, int &saveSize, int prevCryptMode, const u8 *expectedHash, bool &saveDone);
Expand Down

0 comments on commit b8c983f

Please sign in to comment.