mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-05 09:39:32 +00:00
Merge pull request #3629 from loganmc10/master
Fix emscripten async and add glupen64
This commit is contained in:
commit
9fd7ecb668
@ -1,12 +1,12 @@
|
||||
TARGET := retroarch.js
|
||||
|
||||
EOPT = USE_ZLIB=1 USE_SDL=2 FULL_ES2=1 # Emscripten specific options
|
||||
EOPT = USE_ZLIB=1 USE_SDL=2 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
|
||||
OS = Emscripten
|
||||
OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
HAVE_EGL = 1
|
||||
HAVE_OPENGLES = 1
|
||||
@ -21,6 +21,7 @@ HAVE_FBO = 1
|
||||
WANT_ZLIB = 1
|
||||
MEMORY = 268435456
|
||||
LTO = 0
|
||||
ASYNC = 0
|
||||
# XXX: setting this to 1/2 currently crashes Firefox nightly
|
||||
PRECISE_F32 = 2
|
||||
|
||||
@ -35,7 +36,7 @@ endif
|
||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
||||
|
||||
LIBS := -s USE_SDL=2 -s USE_ZLIB=1
|
||||
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 \
|
||||
LDFLAGS := -L. --no-heap-copy -s USE_ZLIB=1 -s TOTAL_MEMORY=$(MEMORY) -s ASYNCIFY=$(ASYNC) \
|
||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||
--js-library emscripten/library_rwebaudio.js \
|
||||
--js-library emscripten/library_rwebinput.js \
|
||||
|
@ -137,6 +137,7 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
lto=0
|
||||
whole_archive=
|
||||
big_stack=
|
||||
async=0
|
||||
if [ $name = "nxengine" ] ; then
|
||||
echo "Applying whole archive linking..."
|
||||
whole_archive="WHOLE_ARCHIVE_LINK=1"
|
||||
@ -144,6 +145,10 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
echo "Applying big stack..."
|
||||
lto=0
|
||||
big_stack="BIG_STACK=1"
|
||||
elif [ $name = "mupen64plus" ] ; then
|
||||
async=1
|
||||
elif [ $name = "glupen64" ] ; then
|
||||
async=1
|
||||
fi
|
||||
echo "-- Building core: $name --"
|
||||
if [ $PLATFORM = "unix" ]; then
|
||||
@ -157,7 +162,7 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
||||
make -C ../ -f Makefile.griffin platform=${platform} clean || exit 1
|
||||
elif [ $PLATFORM = "emscripten" ]; then
|
||||
make -C ../ -f Makefile.emscripten LTO=$lto -j7 clean || exit 1
|
||||
make -C ../ -f Makefile.emscripten ASYNC=$async LTO=$lto -j7 clean || exit 1
|
||||
elif [ $PLATFORM = "unix" ]; then
|
||||
make -C ../ -f Makefile LINK=g++ LTO=$lto -j7 clean || exit 1
|
||||
else
|
||||
@ -169,7 +174,7 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
||||
make -C ../ -f Makefile.griffin platform=${platform} $whole_archive $big_stack -j3 || exit 1
|
||||
elif [ $PLATFORM = "emscripten" ]; then
|
||||
make -C ../ -f Makefile.emscripten LTO=$lto -j7 TARGET=${name}_libretro.js || exit 1
|
||||
make -C ../ -f Makefile.emscripten ASYNC=$async LTO=$lto -j7 TARGET=${name}_libretro.js || exit 1
|
||||
elif [ $PLATFORM = "unix" ]; then
|
||||
make -C ../ -f Makefile LINK=g++ $whole_archive $big_stack -j3 || exit 1
|
||||
elif [ $PLATFORM = "ctr" ]; then
|
||||
@ -274,7 +279,7 @@ for f in `ls -v *_${platform}.${EXT}`; do
|
||||
if [ $MAKEFILE_GRIFFIN = "yes" ]; then
|
||||
make -C ../ -f Makefile.griffin platform=${platform} clean || exit 1
|
||||
elif [ $PLATFORM = "emscripten" ]; then
|
||||
make -C ../ -f Makefile.emscripten LTO=$lto -j7 clean || exit 1
|
||||
make -C ../ -f Makefile.emscripten ASYNC=$async LTO=$lto -j7 clean || exit 1
|
||||
elif [ $PLATFORM = "unix" ]; then
|
||||
make -C ../ -f Makefile LTO=$lto -j7 clean || exit 1
|
||||
else
|
||||
|
@ -40,6 +40,7 @@
|
||||
<a class="dropdown-item" href="." data-core="fceumm">FCEUmm</a>
|
||||
<a class="dropdown-item" href="." data-core="ffmpeg">FFmpeg</a>
|
||||
<a class="dropdown-item" href="." data-core="gambatte">Gambatte</a>
|
||||
<a class="dropdown-item" href="." data-core="glupen64">GLupeN64</a>
|
||||
<a class="dropdown-item" href="." data-core="genesis_plus_gx">Genesis Plus GX</a>
|
||||
<a class="dropdown-item" href="." data-core="gme">Game Music Emu</a>
|
||||
<a class="dropdown-item" href="." data-core="gpsp">gPSP</a>
|
||||
|
Loading…
Reference in New Issue
Block a user