diff options
author | notaz | 2013-04-02 01:34:21 +0300 |
---|---|---|
committer | notaz | 2013-04-02 01:34:21 +0300 |
commit | a95a5e2e0c4bd0da035729d2fd16c068cbd0f633 (patch) | |
tree | 30b05666e7883393820fd4c4152fd77b6e112d0c /libpcsxcore/psxmem.c | |
parent | 55bf68531a29da02569d0c53caa2f08608a191bb (diff) | |
parent | 0069615fdda3a28da547a191bef990256620ff69 (diff) | |
download | pcsx_rearmed-a95a5e2e0c4bd0da035729d2fd16c068cbd0f633.tar.gz pcsx_rearmed-a95a5e2e0c4bd0da035729d2fd16c068cbd0f633.tar.bz2 pcsx_rearmed-a95a5e2e0c4bd0da035729d2fd16c068cbd0f633.zip |
Merge branch 'master' into libretro
Diffstat (limited to 'libpcsxcore/psxmem.c')
-rw-r--r-- | libpcsxcore/psxmem.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libpcsxcore/psxmem.c b/libpcsxcore/psxmem.c index 62bbe26..4da0cf4 100644 --- a/libpcsxcore/psxmem.c +++ b/libpcsxcore/psxmem.c @@ -52,8 +52,9 @@ retry: goto out; } - if (is_fixed) - flags |= MAP_FIXED; + /* avoid MAP_FIXED, it overrides existing mappings.. */ + /* if (is_fixed) + flags |= MAP_FIXED; */ req = (void *)addr; ret = mmap(req, size, PROT_READ | PROT_WRITE, flags, -1, 0); @@ -65,6 +66,11 @@ out: SysMessage("psxMap: warning: wanted to map @%08x, got %p\n", addr, ret); + if (is_fixed) { + psxUnmap(ret, size, tag); + return NULL; + } + if (ret != NULL && ((addr ^ (long)ret) & 0x00ffffff) && !tried_to_align) { |