Build changes. 32 bit Linux/Windows/macOS now supported.
This commit is contained in:
parent
9535e202b9
commit
39748f28fb
15 changed files with 232 additions and 135 deletions
BIN
singe/BreatheFire-65pg.ttf
(Stored with Git LFS)
Normal file
BIN
singe/BreatheFire-65pg.ttf
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -464,3 +464,7 @@ OVERLAY_UPDATED = 1
|
||||||
|
|
||||||
SINGLE_MOUSE = 100
|
SINGLE_MOUSE = 100
|
||||||
MANY_MOUSE = 200
|
MANY_MOUSE = 200
|
||||||
|
|
||||||
|
-- Make old random number calls still work
|
||||||
|
random = {}
|
||||||
|
random.new = math.random
|
||||||
|
|
|
@ -254,8 +254,7 @@ table.sort(GAME_LIST, compareTitles)
|
||||||
if GAME_COUNT == 0 then
|
if GAME_COUNT == 0 then
|
||||||
debugPrint("No games found! Exiting.")
|
debugPrint("No games found! Exiting.")
|
||||||
singeQuit()
|
singeQuit()
|
||||||
end
|
else
|
||||||
|
|
||||||
discPlay()
|
discPlay()
|
||||||
overlaySetResolution(vldpGetWidth(), vldpGetHeight())
|
overlaySetResolution(vldpGetWidth(), vldpGetHeight())
|
||||||
|
|
||||||
|
@ -322,3 +321,4 @@ end
|
||||||
|
|
||||||
-- Prime the pump
|
-- Prime the pump
|
||||||
loadGameAssets(true)
|
loadGameAssets(true)
|
||||||
|
end
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Copyright (C) 2006-2020 Scott Duensing <scott@kangaroopunch.com>
|
# Copyright (C) 2006-2020 Scott Duensing <scott@kangaroopunch.com>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or
|
# This program is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public Licens
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
|
@ -25,7 +25,7 @@ if [[ -z $1 ]]; then
|
||||||
# G_PLATFORM=mingw
|
# G_PLATFORM=mingw
|
||||||
# G_PLATFORM=linux
|
# G_PLATFORM=linux
|
||||||
# G_PLATFORM=pi
|
# G_PLATFORM=pi
|
||||||
G_BITS=64
|
G_BITS=32
|
||||||
G_THIRDPARTY=$(pwd)/thirdparty
|
G_THIRDPARTY=$(pwd)/thirdparty
|
||||||
G_DEST="$(pwd)/../thirdparty-build/${G_PLATFORM}/${G_BITS}"
|
G_DEST="$(pwd)/../thirdparty-build/${G_PLATFORM}/${G_BITS}"
|
||||||
G_TYPE=static
|
G_TYPE=static
|
||||||
|
@ -39,6 +39,7 @@ else
|
||||||
G_PROJECT=$6
|
G_PROJECT=$6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
G_OPTIMIZE="-O2"
|
||||||
G_INSTALLED="${G_DEST}/installed"
|
G_INSTALLED="${G_DEST}/installed"
|
||||||
G_L="-------------------------------------------------------------------------------"
|
G_L="-------------------------------------------------------------------------------"
|
||||||
|
|
||||||
|
@ -52,7 +53,6 @@ case "${G_PLATFORM}" in
|
||||||
G_CCOMPILER="${G_CROSS_HOME}/${G_CROSS}-gcc"
|
G_CCOMPILER="${G_CROSS_HOME}/${G_CROSS}-gcc"
|
||||||
G_CPPCOMPILER="${G_CROSS_HOME}/${G_CROSS}-g++"
|
G_CPPCOMPILER="${G_CROSS_HOME}/${G_CROSS}-g++"
|
||||||
G_RANLIB="${G_CROSS_HOME}/${G_CROSS}-ranlib"
|
G_RANLIB="${G_CROSS_HOME}/${G_CROSS}-ranlib"
|
||||||
G_LUAPLAT="posix"
|
|
||||||
G_ARCH="armv6"
|
G_ARCH="armv6"
|
||||||
G_SYSROOT="/opt/cross/pi/buster"
|
G_SYSROOT="/opt/cross/pi/buster"
|
||||||
;;
|
;;
|
||||||
|
@ -60,31 +60,46 @@ case "${G_PLATFORM}" in
|
||||||
linux)
|
linux)
|
||||||
G_OS="linux"
|
G_OS="linux"
|
||||||
G_CROSS="x86_64-linux-gnu"
|
G_CROSS="x86_64-linux-gnu"
|
||||||
G_CCOMPILER="gcc"
|
if [[ "${G_BITS}" == "32" ]]; then
|
||||||
G_CPPCOMPILER="g++"
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638418
|
||||||
G_RANLIB="ranlib"
|
G_CCOMPILER="${G_CROSS}-gcc -m32"
|
||||||
G_LUAPLAT="linux"
|
G_CPPCOMPILER="${G_CROSS}-g++ -m32"
|
||||||
|
G_ARCH="i386"
|
||||||
|
else
|
||||||
|
G_CCOMPILER="${G_CROSS}-gcc"
|
||||||
|
G_CPPCOMPILER="${G_CROSS}-g++"
|
||||||
G_ARCH="x86_64"
|
G_ARCH="x86_64"
|
||||||
|
fi
|
||||||
|
G_RANLIB="${G_CROSS}-ranlib"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mingw)
|
mingw)
|
||||||
|
# Be sure to use the posix compilers:
|
||||||
|
# sudo update-alternatives --config x86_64-w64-mingw32-g++
|
||||||
|
# sudo update-alternatives --config i686-w64-mingw32-g++
|
||||||
G_OS="mingw32"
|
G_OS="mingw32"
|
||||||
G_CROSS="x86_64-w64-mingw32"
|
if [[ "${G_BITS}" == "32" ]]; then
|
||||||
|
G_ARCH="i686"
|
||||||
|
else
|
||||||
|
G_ARCH="x86_64"
|
||||||
|
fi
|
||||||
|
G_CROSS="${G_ARCH}-w64-mingw32"
|
||||||
G_CCOMPILER="${G_CROSS}-gcc"
|
G_CCOMPILER="${G_CROSS}-gcc"
|
||||||
G_CPPCOMPILER="${G_CROSS}-g++"
|
G_CPPCOMPILER="${G_CROSS}-g++"
|
||||||
G_RANLIB="${G_CROSS}-ranlib"
|
G_RANLIB="${G_CROSS}-ranlib"
|
||||||
G_LUAPLAT="generic"
|
|
||||||
G_ARCH="x86_64"
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mac)
|
mac)
|
||||||
G_OS="darwin"
|
G_OS="darwin"
|
||||||
G_CROSS="x86_64-apple-darwin15"
|
if [[ "${G_BITS}" == "32" ]]; then
|
||||||
G_CCOMPILER="o64-clang"
|
G_ARCH="i386"
|
||||||
G_CPPCOMPILER="o64-clang++"
|
else
|
||||||
G_RANLIB="${G_CROSS}-ranlib"
|
|
||||||
G_LUAPLAT="generic"
|
|
||||||
G_ARCH="x86_64"
|
G_ARCH="x86_64"
|
||||||
|
fi
|
||||||
|
G_CROSS="${G_ARCH}-apple-darwin15"
|
||||||
|
G_CCOMPILER="${G_CROSS}-clang"
|
||||||
|
G_CPPCOMPILER="${G_CROSS}-clang++"
|
||||||
|
G_RANLIB="${G_CROSS}-ranlib"
|
||||||
O_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
|
O_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.8
|
export MACOSX_DEPLOYMENT_TARGET=10.8
|
||||||
;;
|
;;
|
||||||
|
@ -132,9 +147,9 @@ function autoBuild() {
|
||||||
|
|
||||||
export CC=${G_CCOMPILER}
|
export CC=${G_CCOMPILER}
|
||||||
export CXX=${G_CPPCOMPILER}
|
export CXX=${G_CPPCOMPILER}
|
||||||
export CFLAGS="${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
export CFLAGS="${G_OPTIMIZE} ${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
||||||
export CXXFLAGS="${MORE_CFLAGS} ${MORE_CXXFLAGS} -isystem${G_INSTALLED}/include"
|
export CXXFLAGS="${MORE_CFLAGS} ${MORE_CXXFLAGS} -isystem${G_INSTALLED}/include"
|
||||||
export CPPFLAGS="${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
export CPPFLAGS="${G_OPTIMIZE} ${MORE_CFLAGS} -isystem${G_INSTALLED}/include"
|
||||||
export LDFLAGS="${MORE_LIBS} -L${G_INSTALLED}/lib"
|
export LDFLAGS="${MORE_LIBS} -L${G_INSTALLED}/lib"
|
||||||
export LD_LIBRARY_PATH="${G_INSTALLED}/lib"
|
export LD_LIBRARY_PATH="${G_INSTALLED}/lib"
|
||||||
export PKG_CONFIG_LIBDIR="${G_INSTALLED}/lib/pkgconfig"
|
export PKG_CONFIG_LIBDIR="${G_INSTALLED}/lib/pkgconfig"
|
||||||
|
@ -316,7 +331,7 @@ if [[ ! -e "${G_INSTALLED}/lib/libz.a" ]]; then
|
||||||
echo ${G_L}
|
echo ${G_L}
|
||||||
mkdir -p "${G_DEST}/zlib"
|
mkdir -p "${G_DEST}/zlib"
|
||||||
pushd "${G_DEST}/zlib"
|
pushd "${G_DEST}/zlib"
|
||||||
RANLIB="${G_RANLIB}" CC="${G_CCOMPILER}" "${G_THIRDPARTY}/zlib/configure" --static --prefix="${G_INSTALLED}"
|
RANLIB="${G_RANLIB}" CC="${G_CCOMPILER}" CFLAGS="${G_OPTIMIZE}" "${G_THIRDPARTY}/zlib/configure" --static --prefix="${G_INSTALLED}"
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
popd
|
popd
|
||||||
|
@ -330,7 +345,7 @@ if [[ ! -e "${G_INSTALLED}/lib/libbz2.a" ]]; then
|
||||||
mkdir -p "${G_DEST}/bzip2"
|
mkdir -p "${G_DEST}/bzip2"
|
||||||
pushd "${G_DEST}/bzip2"
|
pushd "${G_DEST}/bzip2"
|
||||||
cp -fr "${G_THIRDPARTY}/bzip2/." .
|
cp -fr "${G_THIRDPARTY}/bzip2/." .
|
||||||
make install PREFIX="${G_INSTALLED}" CC="${G_CCOMPILER}" RANLIB="${G_RANLIB}"
|
make install PREFIX="${G_INSTALLED}" CC="${G_CCOMPILER}" CFLAGS="${G_OPTIMIZE}" RANLIB="${G_RANLIB}"
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -342,7 +357,7 @@ if [[ ! -e "${G_INSTALLED}/lib/liblua.a" ]]; then
|
||||||
mkdir -p "${G_DEST}/lua"
|
mkdir -p "${G_DEST}/lua"
|
||||||
pushd "${G_DEST}/lua"
|
pushd "${G_DEST}/lua"
|
||||||
cp -fr "${G_THIRDPARTY}/lua/." .
|
cp -fr "${G_THIRDPARTY}/lua/." .
|
||||||
make ${G_LUAPLAT} CC="${G_CCOMPILER}" RANLIB="${G_RANLIB}"
|
make generic CC="${G_CCOMPILER}" CFLAGS="${G_OPTIMIZE}" RANLIB="${G_RANLIB}"
|
||||||
make install INSTALL_TOP="${G_INSTALLED}"
|
make install INSTALL_TOP="${G_INSTALLED}"
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
@ -355,14 +370,23 @@ if [[ ! -e "${G_INSTALLED}/lib/libjbig.a" ]]; then
|
||||||
mkdir -p "${G_DEST}/SDL2_image/jbig"
|
mkdir -p "${G_DEST}/SDL2_image/jbig"
|
||||||
pushd "${G_DEST}/SDL2_image/jbig"
|
pushd "${G_DEST}/SDL2_image/jbig"
|
||||||
cp -fr "${G_THIRDPARTY}/jbigkit/." .
|
cp -fr "${G_THIRDPARTY}/jbigkit/." .
|
||||||
make lib CC="${G_CCOMPILER}" RANLIB="${G_RANLIB}"
|
make lib CC="${G_CCOMPILER}" CFLAGS="${G_OPTIMIZE}" RANLIB="${G_RANLIB}"
|
||||||
cp -f libjbig/*.a "${G_INSTALLED}/lib/."
|
cp -f libjbig/*.a "${G_INSTALLED}/lib/."
|
||||||
cp -f libjbig/*.h "${G_INSTALLED}/include/."
|
cp -f libjbig/*.h "${G_INSTALLED}/include/."
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# === XZ Utils ===
|
# === XZ Utils ===
|
||||||
|
if [[ "${G_OS}" == "mingw32" ]]; then
|
||||||
|
# -O2 breaks windres
|
||||||
|
O_OPTIMIZE=${G_OPTIMIZE}
|
||||||
|
G_OPTIMIZE=""
|
||||||
|
fi
|
||||||
autoBuild liblzma.a xz
|
autoBuild liblzma.a xz
|
||||||
|
if [[ "${G_OS}" == "mingw32" ]]; then
|
||||||
|
G_OPTIMIZE=${O_OPTIMIZE}
|
||||||
|
O_OPTIMIZE=""
|
||||||
|
fi
|
||||||
|
|
||||||
# === TIFF ===
|
# === TIFF ===
|
||||||
autoBuild libtiff.a SDL2_image/external/tiff-4.1.0
|
autoBuild libtiff.a SDL2_image/external/tiff-4.1.0
|
||||||
|
@ -389,7 +413,11 @@ autoBuild libvorbis.a SDL2_mixer/external/libvorbis-1.3.6
|
||||||
autoBuild libmodplug.a SDL2_mixer/external/libmodplug-0.8.9.0 "ac_cv_c_bigendian=no"
|
autoBuild libmodplug.a SDL2_mixer/external/libmodplug-0.8.9.0 "ac_cv_c_bigendian=no"
|
||||||
|
|
||||||
# === MPG123 ===
|
# === MPG123 ===
|
||||||
|
if [[ "${G_ARCH}" == "i386" ]]; then
|
||||||
|
autoBuild libmpg123.a SDL2_mixer/external/mpg123-1.25.13 "--with-cpu=x86"
|
||||||
|
else
|
||||||
autoBuild libmpg123.a SDL2_mixer/external/mpg123-1.25.13
|
autoBuild libmpg123.a SDL2_mixer/external/mpg123-1.25.13
|
||||||
|
fi
|
||||||
|
|
||||||
# === Opus ===
|
# === Opus ===
|
||||||
autoBuild libopus.a SDL2_mixer/external/opus-1.3.1
|
autoBuild libopus.a SDL2_mixer/external/opus-1.3.1
|
||||||
|
@ -453,7 +481,7 @@ if [[ "${G_PLATFORM}" == "pi" ]]; then
|
||||||
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
MORE_LIBS="-Wl,-rpath-link,${G_SYSROOT}/opt/vc/lib -L${G_SYSROOT}/opt/vc/lib -lbcm_host"
|
||||||
fi
|
fi
|
||||||
if [[ "${G_PLATFORM}" == "mac" ]]; then
|
if [[ "${G_PLATFORM}" == "mac" ]]; then
|
||||||
MAC_SDL_LIBS="-lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
MAC_SDL_LIBS="-lSDL2 -lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
||||||
MORE_LIBS=${MAC_SDL_LIBS}
|
MORE_LIBS=${MAC_SDL_LIBS}
|
||||||
fi
|
fi
|
||||||
autoBuild libSDL2_image.a SDL2_image "--disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-webp-shared"
|
autoBuild libSDL2_image.a SDL2_image "--disable-jpg-shared --disable-png-shared --disable-tif-shared --disable-webp-shared"
|
|
@ -37,12 +37,10 @@ function doBuild() {
|
||||||
# Override this
|
# Override this
|
||||||
QMAKE_CFLAGS="-isystem ../../thirdparty-build/${OSNAME}/${OSARCH}/installed/include -isystem ../../singe/thirdparty/arg_parser -isystem ../../singe/thirdparty/manymouse"
|
QMAKE_CFLAGS="-isystem ../../thirdparty-build/${OSNAME}/${OSARCH}/installed/include -isystem ../../singe/thirdparty/arg_parser -isystem ../../singe/thirdparty/manymouse"
|
||||||
|
|
||||||
pushd "${SOURCE_DIR}/.."
|
pushd "${SOURCE_DIR}/.." &> /dev/null
|
||||||
mkdir -p build/${OSNAME}/${OSARCH}
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
if [[ -d temp ]]; then
|
[[ -d temp ]] && rm -rf temp
|
||||||
rm -rf temp
|
|
||||||
fi
|
|
||||||
mkdir -p temp
|
mkdir -p temp
|
||||||
cd temp
|
cd temp
|
||||||
|
|
||||||
|
@ -59,17 +57,36 @@ function doBuild() {
|
||||||
${CROSS}-${CCOMPILER} ${QMAKE_CFLAGS} ${EXTRA_CFLAGS} -c "${SOURCE}" -o ${O}
|
${CROSS}-${CCOMPILER} ${QMAKE_CFLAGS} ${EXTRA_CFLAGS} -c "${SOURCE}" -o ${O}
|
||||||
done
|
done
|
||||||
|
|
||||||
TARGET="${SOURCE_DIR}/../build/${OSNAME}/${OSARCH}/${TARGET}${EXT}"
|
TARGET="${SOURCE_DIR}/../build/${TARGET}${EXT}"
|
||||||
echo "Linking ${TARGET}..."
|
echo "Linking ${TARGET}..."
|
||||||
${CROSS}-${CPPCOMPILER} -o "${TARGET}" ${OFILES} ${EXTRA_OFILES} "-L${SOURCE_DIR}/../thirdparty-build/${OSNAME}/${OSARCH}/installed/lib" ${EXTRA_LD_FLAGS}
|
# The grep nonsense hides a warning we don't care about.
|
||||||
|
${CROSS}-${CPPCOMPILER} -o "${TARGET}" ${OFILES} ${EXTRA_OFILES} "-L${SOURCE_DIR}/../thirdparty-build/${OSNAME}/${OSARCH}/installed/lib" ${EXTRA_LD_FLAGS} 2>&1 | grep -v loslib || true
|
||||||
|
|
||||||
echo "Compressing ${TARGET}..."
|
echo "Compressing ${TARGET}..."
|
||||||
${CROSS}-strip "${TARGET}"
|
${CROSS}-strip "${TARGET}"
|
||||||
upx -9 "${TARGET}"
|
upx -9 "${TARGET}"
|
||||||
|
|
||||||
popd
|
cd ..
|
||||||
|
rm -rf temp
|
||||||
|
|
||||||
|
popd &> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Find Singe version
|
||||||
|
G_VERSION=$(grep VERSION_STRING singe.h | cut -d '"' -f 2)
|
||||||
|
|
||||||
|
|
||||||
|
# 32 Bit Linux
|
||||||
|
echo -e "${G_L}\nLinux i386\n${G_L}"
|
||||||
|
CROSS="x86_64-linux-gnu"
|
||||||
|
CCOMPILER="gcc"
|
||||||
|
CPPCOMPILER="g++"
|
||||||
|
EXTRA_CFLAGS="-m32 -O2"
|
||||||
|
EXTRA_OFILES=""
|
||||||
|
EXTRA_LD_FLAGS="-m32 -l:everything.a -lpthread -lXv -lX11 -lXext -lm -ldl -lrt"
|
||||||
|
doBuild Singe-${G_VERSION}-Linux-i386 linux 32
|
||||||
|
|
||||||
# 64 Bit Linux
|
# 64 Bit Linux
|
||||||
echo -e "${G_L}\nLinux x86_64\n${G_L}"
|
echo -e "${G_L}\nLinux x86_64\n${G_L}"
|
||||||
CROSS="x86_64-linux-gnu"
|
CROSS="x86_64-linux-gnu"
|
||||||
|
@ -78,7 +95,23 @@ CPPCOMPILER="g++"
|
||||||
EXTRA_CFLAGS="-O2"
|
EXTRA_CFLAGS="-O2"
|
||||||
EXTRA_OFILES=""
|
EXTRA_OFILES=""
|
||||||
EXTRA_LD_FLAGS="-l:everything.a -lpthread -lXv -lX11 -lXext -lm -ldl -lrt"
|
EXTRA_LD_FLAGS="-l:everything.a -lpthread -lXv -lX11 -lXext -lm -ldl -lrt"
|
||||||
doBuild Singe-Linux-x86_64 linux 64
|
doBuild Singe-${G_VERSION}-Linux-x86_64 linux 64
|
||||||
|
|
||||||
|
# 32 Bit Windows
|
||||||
|
echo -e "${G_L}\nWindows i686\n${G_L}"
|
||||||
|
CROSS="i686-w64-mingw32"
|
||||||
|
CCOMPILER="gcc"
|
||||||
|
CPPCOMPILER="g++"
|
||||||
|
EXTRA_CFLAGS="-O2"
|
||||||
|
EXTRA_OFILES="/tmp/singe.res"
|
||||||
|
EXTRA_LD_FLAGS="-mwindows -static -lmingw32 -l:everything.a -lm -lbcrypt -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -Dmain=SDL_main"
|
||||||
|
xcf2png icon.xcf -o /tmp/icon.png
|
||||||
|
icotool -c -o /tmp/icon.ico /tmp/icon.png
|
||||||
|
${CROSS}-windres singe.rc -O coff -o /tmp/singe.res
|
||||||
|
doBuild Singe-${G_VERSION}-Windows-i686 mingw 32 .exe
|
||||||
|
rm /tmp/icon.ico
|
||||||
|
rm /tmp/icon.png
|
||||||
|
rm /tmp/singe.res
|
||||||
|
|
||||||
# 64 Bit Windows
|
# 64 Bit Windows
|
||||||
echo -e "${G_L}\nWindows x86_64\n${G_L}"
|
echo -e "${G_L}\nWindows x86_64\n${G_L}"
|
||||||
|
@ -90,8 +123,8 @@ EXTRA_OFILES="/tmp/singe.res"
|
||||||
EXTRA_LD_FLAGS="-mwindows -static -lmingw32 -l:everything.a -lm -lbcrypt -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -Dmain=SDL_main"
|
EXTRA_LD_FLAGS="-mwindows -static -lmingw32 -l:everything.a -lm -lbcrypt -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -Dmain=SDL_main"
|
||||||
xcf2png icon.xcf -o /tmp/icon.png
|
xcf2png icon.xcf -o /tmp/icon.png
|
||||||
icotool -c -o /tmp/icon.ico /tmp/icon.png
|
icotool -c -o /tmp/icon.ico /tmp/icon.png
|
||||||
x86_64-w64-mingw32-windres singe.rc -O coff -o /tmp/singe.res
|
${CROSS}-windres singe.rc -O coff -o /tmp/singe.res
|
||||||
doBuild Singe-Windows-x86_64 mingw 64 .exe
|
doBuild Singe-${G_VERSION}-Windows-x86_64 mingw 64 .exe
|
||||||
rm /tmp/icon.ico
|
rm /tmp/icon.ico
|
||||||
rm /tmp/icon.png
|
rm /tmp/icon.png
|
||||||
rm /tmp/singe.res
|
rm /tmp/singe.res
|
||||||
|
@ -105,7 +138,19 @@ CPPCOMPILER="g++"
|
||||||
EXTRA_CFLAGS="-O2 --sysroot ${SYSROOT}"
|
EXTRA_CFLAGS="-O2 --sysroot ${SYSROOT}"
|
||||||
EXTRA_OFILES=""
|
EXTRA_OFILES=""
|
||||||
EXTRA_LD_FLAGS="--sysroot ${SYSROOT} -l:everything.a -Wl,-rpath-link,${SYSROOT}/opt/vc/lib -L${SYSROOT}/opt/vc/lib -lbcm_host -lasound -lpthread -lm -ldl -lsndio -lmmal_core -lmmal_util -lmmal_vc_client -lvdpau -ldrm -lgbm -lX11 -lsamplerate"
|
EXTRA_LD_FLAGS="--sysroot ${SYSROOT} -l:everything.a -Wl,-rpath-link,${SYSROOT}/opt/vc/lib -L${SYSROOT}/opt/vc/lib -lbcm_host -lasound -lpthread -lm -ldl -lsndio -lmmal_core -lmmal_util -lmmal_vc_client -lvdpau -ldrm -lgbm -lX11 -lsamplerate"
|
||||||
doBuild Singe-Pi-armv6 pi 32
|
doBuild Singe-${G_VERSION}-Pi-armv6 pi 32
|
||||||
|
|
||||||
|
# 32 Bit macOS
|
||||||
|
echo -e "${G_L}\nmacOS i386\n${G_L}"
|
||||||
|
CROSS="i386-apple-darwin15"
|
||||||
|
CCOMPILER="clang"
|
||||||
|
CPPCOMPILER="clang++"
|
||||||
|
EXTRA_CFLAGS="-O2"
|
||||||
|
EXTRA_LD_FLAGS="-Wl,-no_pie -stdlib=libc++ -leverything -lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
||||||
|
O_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=10.8
|
||||||
|
doBuild Singe-${G_VERSION}-macOS-i386 mac 32
|
||||||
|
export MACOSX_DEPLOYMENT_TARGET=${O_MACOSX_DEPLOYMENT_TARGET}
|
||||||
|
|
||||||
# 64 Bit macOS
|
# 64 Bit macOS
|
||||||
echo -e "${G_L}\nmacOS x86_64\n${G_L}"
|
echo -e "${G_L}\nmacOS x86_64\n${G_L}"
|
||||||
|
@ -116,5 +161,5 @@ EXTRA_CFLAGS="-O2"
|
||||||
EXTRA_LD_FLAGS="-stdlib=libc++ -leverything -lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
EXTRA_LD_FLAGS="-stdlib=libc++ -leverything -lm -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
|
||||||
O_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
|
O_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET}
|
||||||
export MACOSX_DEPLOYMENT_TARGET=10.8
|
export MACOSX_DEPLOYMENT_TARGET=10.8
|
||||||
doBuild Singe-macOS-x86_64 mac 64
|
doBuild Singe-${G_VERSION}-macOS-x86_64 mac 64
|
||||||
export MACOSX_DEPLOYMENT_TARGET=${O_MACOSX_DEPLOYMENT_TARGET}
|
export MACOSX_DEPLOYMENT_TARGET=${O_MACOSX_DEPLOYMENT_TARGET}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash -x
|
#!/bin/bash -xe
|
||||||
|
|
||||||
#
|
#
|
||||||
# Singe 2
|
# Singe 2
|
||||||
|
@ -19,9 +19,23 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
SOURCEDIR=$1
|
|
||||||
DESTDIR=$2
|
|
||||||
TARGET=$3
|
|
||||||
|
|
||||||
strip "${DESTDIR}/${TARGET}"
|
function buildDependencies() {
|
||||||
upx -9 "${DESTDIR}/${TARGET}"
|
local BITS=$1
|
||||||
|
local PLATFORM=$2
|
||||||
|
./buildPrerequisites.sh "$(pwd)/thirdparty" "$(pwd)/../thirdparty-build" ${BITS} ${PLATFORM} static "$(pwd)"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
buildDependencies 32 linux
|
||||||
|
buildDependencies 64 linux
|
||||||
|
|
||||||
|
buildDependencies 32 pi
|
||||||
|
|
||||||
|
buildDependencies 32 mingw
|
||||||
|
buildDependencies 64 mingw
|
||||||
|
|
||||||
|
buildDependencies 32 mac
|
||||||
|
buildDependencies 64 mac
|
||||||
|
|
||||||
|
./buildRelease.sh
|
12
singe/main.c
12
singe/main.c
|
@ -605,10 +605,6 @@ void launcher(char *exeName, ConfigT *conf) {
|
||||||
Mix_Quit();
|
Mix_Quit();
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
utilTraceEnd();
|
utilTraceEnd();
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
if (!conf->noConsole) getchar();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -724,7 +720,7 @@ void showUsage(char *name, char *message) {
|
||||||
} else {
|
} else {
|
||||||
// Winders
|
// Winders
|
||||||
temp = utilCreateString("Menu.bat");
|
temp = utilCreateString("Menu.bat");
|
||||||
data = utilCreateString("@echo off\n\r\n\r%s -k -x 720 -y 480 -d data -v Singe\\menuBackground.mkv Singe\\Menu.singe\n\r", utilGetLastPathComponent(name));
|
data = utilCreateString("@start %s -k -x 720 -y 480 -d data -v Singe\\menuBackground.mkv Singe\\Menu.singe\n", utilGetLastPathComponent(name));
|
||||||
}
|
}
|
||||||
created |= extractFile(temp, (unsigned char *)data, strlen(data));
|
created |= extractFile(temp, (unsigned char *)data, strlen(data));
|
||||||
utilChMod(temp, 0777);
|
utilChMod(temp, 0777);
|
||||||
|
@ -742,7 +738,7 @@ void showUsage(char *name, char *message) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
getchar();
|
if (utilGetConsoleEnabled()) getchar();
|
||||||
#endif
|
#endif
|
||||||
exit(result);
|
exit(result);
|
||||||
}
|
}
|
||||||
|
@ -766,5 +762,9 @@ int main(int argc, char *argv[]) {
|
||||||
destroyConf(&conf);
|
destroyConf(&conf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
if (utilGetConsoleEnabled()) getchar();
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ static_FALSE {
|
||||||
BUILDTHIRDARGS = \"$$PWD/thirdparty\" \"$$OUT_PWD/../thirdparty-build\" $$BITNESS $$PLATFORM $$LIBTYPE \"$$PWD\"
|
BUILDTHIRDARGS = \"$$PWD/thirdparty\" \"$$OUT_PWD/../thirdparty-build\" $$BITNESS $$PLATFORM $$LIBTYPE \"$$PWD\"
|
||||||
|
|
||||||
platformLinux {
|
platformLinux {
|
||||||
BUILDTHIRD.commands = bash $$PWD/preBuild.sh $$BUILDTHIRDARGS
|
BUILDTHIRD.commands = bash $$PWD/buildPrerequisites.sh $$BUILDTHIRDARGS
|
||||||
BUILDTHIRD.target = this
|
BUILDTHIRD.target = this
|
||||||
PRE_TARGETDEPS += this
|
PRE_TARGETDEPS += this
|
||||||
QMAKE_EXTRA_TARGETS += BUILDTHIRD
|
QMAKE_EXTRA_TARGETS += BUILDTHIRD
|
||||||
|
@ -252,9 +252,9 @@ dynamic {
|
||||||
}
|
}
|
||||||
|
|
||||||
OTHER_FILES += \
|
OTHER_FILES += \
|
||||||
preBuild.sh \
|
|
||||||
postLink.sh \
|
|
||||||
buildRelease.sh \
|
buildRelease.sh \
|
||||||
|
buildTheWorld.sh \
|
||||||
|
buildPrerequisites.sh \
|
||||||
singe.rc \
|
singe.rc \
|
||||||
controls.cfg \
|
controls.cfg \
|
||||||
Framework.singe \
|
Framework.singe \
|
||||||
|
@ -262,10 +262,7 @@ OTHER_FILES += \
|
||||||
Menu.singe
|
Menu.singe
|
||||||
|
|
||||||
platformLinux {
|
platformLinux {
|
||||||
#QMAKE_POST_LINK += bash $$PWD/postLink.sh "$$PWD" "$$DESTDIR" "$$TARGET"
|
|
||||||
|
|
||||||
# === Generate some data for our buildRelease script ===
|
# === Generate some data for our buildRelease script ===
|
||||||
|
|
||||||
FILEINFO = "SOURCES=\"$$SOURCES\"" \
|
FILEINFO = "SOURCES=\"$$SOURCES\"" \
|
||||||
"HEADERS=\"$$HEADERS\"" \
|
"HEADERS=\"$$HEADERS\"" \
|
||||||
"LINUX_LIBS=\"$$LIBS\"" \
|
"LINUX_LIBS=\"$$LIBS\"" \
|
||||||
|
|
|
@ -667,8 +667,8 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
@FLaC__HAS_DOXYGEN_FALSE@distclean-local:
|
|
||||||
@FLaC__HAS_DOXYGEN_FALSE@install-data-local:
|
@FLaC__HAS_DOXYGEN_FALSE@install-data-local:
|
||||||
|
@FLaC__HAS_DOXYGEN_FALSE@distclean-local:
|
||||||
@FLaC__HAS_DOXYGEN_FALSE@uninstall-local:
|
@FLaC__HAS_DOXYGEN_FALSE@uninstall-local:
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
|
|
|
@ -394,9 +394,9 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
|
||||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
|
||||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||||
|
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||||
|
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
|
||||||
|
|
|
@ -1018,9 +1018,9 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
@HAVE_DOXYGEN_FALSE@clean-local:
|
||||||
@HAVE_DOXYGEN_FALSE@install-data-local:
|
@HAVE_DOXYGEN_FALSE@install-data-local:
|
||||||
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
@HAVE_DOXYGEN_FALSE@uninstall-local:
|
||||||
@HAVE_DOXYGEN_FALSE@clean-local:
|
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
|
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \
|
||||||
|
|
18
singe/thirdparty/manymouse/macosx_hidutilities.c
vendored
18
singe/thirdparty/manymouse/macosx_hidutilities.c
vendored
|
@ -158,7 +158,7 @@ typedef recDevice* pRecDevice;
|
||||||
static IONotificationPortRef gNotifyPort;
|
static IONotificationPortRef gNotifyPort;
|
||||||
static io_iterator_t gAddedIter;
|
static io_iterator_t gAddedIter;
|
||||||
static CFRunLoopRef gRunLoop;
|
static CFRunLoopRef gRunLoop;
|
||||||
#endif USE_NOTIFICATIONS
|
#endif //USE_NOTIFICATIONS
|
||||||
|
|
||||||
// for element retrieval
|
// for element retrieval
|
||||||
static pRecDevice gCurrentGetDevice = NULL;
|
static pRecDevice gCurrentGetDevice = NULL;
|
||||||
|
@ -386,7 +386,7 @@ static void hid_AddElement (CFTypeRef refElement, pRecElement * ppElementCurrent
|
||||||
#if 0
|
#if 0
|
||||||
else
|
else
|
||||||
HIDReportError ("CFNumberGetValue error when getting value for refUsage or refUsagePage.");
|
HIDReportError ("CFNumberGetValue error when getting value for refUsage or refUsagePage.");
|
||||||
#endif 0
|
#endif // 0
|
||||||
}
|
}
|
||||||
else // collection
|
else // collection
|
||||||
pElement = (pRecElement) malloc (sizeof (recElement));
|
pElement = (pRecElement) malloc (sizeof (recElement));
|
||||||
|
@ -741,7 +741,7 @@ static pRecDevice hid_DisposeDevice (pRecDevice pDevice)
|
||||||
#if 0
|
#if 0
|
||||||
if (kIOReturnSuccess != result)
|
if (kIOReturnSuccess != result)
|
||||||
HIDReportErrorNum ("hid_DisposeDevice: HIDDequeueDevice error: 0x%8.8X.", result);
|
HIDReportErrorNum ("hid_DisposeDevice: HIDDequeueDevice error: 0x%8.8X.", result);
|
||||||
#endif 1
|
#endif //1
|
||||||
|
|
||||||
hid_DisposeDeviceElements (pDevice->pListElements);
|
hid_DisposeDeviceElements (pDevice->pListElements);
|
||||||
pDevice->pListElements = NULL;
|
pDevice->pListElements = NULL;
|
||||||
|
@ -765,7 +765,7 @@ static pRecDevice hid_DisposeDevice (pRecDevice pDevice)
|
||||||
if (kIOReturnSuccess != result)
|
if (kIOReturnSuccess != result)
|
||||||
HIDReportErrorNum ("hid_DisposeDevice: IOObjectRelease error: 0x%8.8X.", result);
|
HIDReportErrorNum ("hid_DisposeDevice: IOObjectRelease error: 0x%8.8X.", result);
|
||||||
}
|
}
|
||||||
#endif USE_NOTIFICATIONS
|
#endif //USE_NOTIFICATIONS
|
||||||
|
|
||||||
// remove this device from the device list
|
// remove this device from the device list
|
||||||
if (gpDeviceList == pDevice) // head of list?
|
if (gpDeviceList == pDevice) // head of list?
|
||||||
|
@ -868,7 +868,7 @@ static unsigned long HIDDequeueDevice (pRecDevice pDevice)
|
||||||
CFRelease(pDevice->queueRunLoopSource);
|
CFRelease(pDevice->queueRunLoopSource);
|
||||||
pDevice->queueRunLoopSource = NULL;
|
pDevice->queueRunLoopSource = NULL;
|
||||||
}
|
}
|
||||||
#endif USE_ASYNC_EVENTS
|
#endif //USE_ASYNC_EVENTS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -949,7 +949,7 @@ static unsigned long HIDCreateOpenDeviceInterface (UInt32 hidDevice, pRecDevice
|
||||||
plugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,
|
plugInResult = (*ppPlugInInterface)->QueryInterface (ppPlugInInterface,
|
||||||
CFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void *) &(pDevice->interface));
|
CFUUIDGetUUIDBytes (kIOHIDDeviceInterfaceID), (void *) &(pDevice->interface));
|
||||||
if (S_OK != plugInResult)
|
if (S_OK != plugInResult)
|
||||||
HIDReportErrorNum ("CouldnÕt query HID class device interface from plugInInterface", plugInResult);
|
HIDReportErrorNum ("Couldn't query HID class device interface from plugInInterface", plugInResult);
|
||||||
IODestroyPlugInInterface (ppPlugInInterface); // replace (*ppPlugInInterface)->Release (ppPlugInInterface)
|
IODestroyPlugInInterface (ppPlugInInterface); // replace (*ppPlugInInterface)->Release (ppPlugInInterface)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1072,7 +1072,7 @@ static void hid_RemovalCallbackFunction(void * target, IOReturn result, void * r
|
||||||
pDevice->disconnect = DISCONNECT_TELLUSER;
|
pDevice->disconnect = DISCONNECT_TELLUSER;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif USE_NOTIFICATIONS
|
#endif //USE_NOTIFICATIONS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ static void hid_AddDevices (void *refCon, io_iterator_t iterator)
|
||||||
HIDReportErrorNum ("hid_AddDevices: IOServiceAddInterestNotification error: x0%8.8lX.", result);
|
HIDReportErrorNum ("hid_AddDevices: IOServiceAddInterestNotification error: x0%8.8lX.", result);
|
||||||
#else
|
#else
|
||||||
result = (*(IOHIDDeviceInterface**)pNewDevice->interface)->setRemovalCallback (pNewDevice->interface, hid_RemovalCallbackFunction,pNewDeviceAt,0);
|
result = (*(IOHIDDeviceInterface**)pNewDevice->interface)->setRemovalCallback (pNewDevice->interface, hid_RemovalCallbackFunction,pNewDeviceAt,0);
|
||||||
#endif USE_NOTIFICATIONS
|
#endif //USE_NOTIFICATIONS
|
||||||
|
|
||||||
// release the device object, it is no longer needed
|
// release the device object, it is no longer needed
|
||||||
result = IOObjectRelease (ioHIDDeviceObject);
|
result = IOObjectRelease (ioHIDDeviceObject);
|
||||||
|
@ -1243,7 +1243,7 @@ static Boolean HIDBuildDeviceList (UInt32 usagePage, UInt32 usage)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif USE_NOTIFICATIONS
|
#endif //USE_NOTIFICATIONS
|
||||||
// IOServiceGetMatchingServices consumes a reference to the dictionary, so we don't need to release the dictionary ref.
|
// IOServiceGetMatchingServices consumes a reference to the dictionary, so we don't need to release the dictionary ref.
|
||||||
hidMatchDictionary = NULL;
|
hidMatchDictionary = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,6 +155,11 @@ void utilFixPathSeparators(char **path, bool slash) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool utilGetConsoleEnabled(void) {
|
||||||
|
return _consoleEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
char *utilGetFileExtension(char *filename) {
|
char *utilGetFileExtension(char *filename) {
|
||||||
char *start = filename + strlen(filename);
|
char *start = filename + strlen(filename);
|
||||||
int32_t x;
|
int32_t x;
|
||||||
|
|
|
@ -42,6 +42,7 @@ void utilDie(char *fmt, ...);
|
||||||
void utilEnableConsole(bool enable);
|
void utilEnableConsole(bool enable);
|
||||||
bool utilFileExists(char *filename);
|
bool utilFileExists(char *filename);
|
||||||
void utilFixPathSeparators(char **path, bool slash);
|
void utilFixPathSeparators(char **path, bool slash);
|
||||||
|
bool utilGetConsoleEnabled(void);
|
||||||
char *utilGetFileExtension(char *filename);
|
char *utilGetFileExtension(char *filename);
|
||||||
char *utilGetLastPathComponent(char *pathname);
|
char *utilGetLastPathComponent(char *pathname);
|
||||||
char utilGetPathSeparator(void);
|
char utilGetPathSeparator(void);
|
||||||
|
|
|
@ -630,7 +630,7 @@ int32_t videoUpdate(int32_t playerHandle, SDL_Texture **texture) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used to determine if we should play two frames rapidly to catch up to audio
|
// Used to determine if we should play two frames rapidly to catch up to audio
|
||||||
v->audioDelta = labs(v->audioPosition - (int64_t)((double)v->timestamp * 0.001 * (double)v->audioProps->SampleRate));
|
v->audioDelta = labs((long)(v->audioPosition - (int64_t)((double)v->timestamp * 0.001 * (double)v->audioProps->SampleRate)));
|
||||||
|
|
||||||
// Did we trip the audio sync compensation?
|
// Did we trip the audio sync compensation?
|
||||||
if (v->audioDelta > threshold) {
|
if (v->audioDelta > threshold) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue