notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
733a15d
)
Merge pull request #6 from tobiasjakobi/memalign
author
Twinaphex
<libretro@gmail.com>
Tue, 4 Mar 2014 20:59:12 +0000
(21:59 +0100)
committer
Twinaphex
<libretro@gmail.com>
Tue, 4 Mar 2014 20:59:12 +0000
(21:59 +0100)
libretro: only use posix_memalign when it's safe
frontend/libretro.c
patch
|
blob
|
blame
|
history
diff --git
a/frontend/libretro.c
b/frontend/libretro.c
index
13a4af3
..
b8dc36d
100644
(file)
--- a/
frontend/libretro.c
+++ b/
frontend/libretro.c
@@
-989,7
+989,11
@@
void retro_init(void)
exit(1);
}
+#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)
posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
+#else
+ vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2);
+#endif
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir)
{