From 511e6d4c28410e41fba49eda53b509ed9bc356f0 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Mon, 4 May 2020 18:52:25 -0500 Subject: [PATCH] Window resizing now checks if it's really a window. --- singe/buildPrerequisites.sh | 10 +++++++--- singe/buildRelease.sh | 6 +++--- singe/buildTheWorld.sh | 2 +- singe/singe.c | 2 +- singe/singe.h | 2 +- singe/singe.rc | 8 ++++---- .../external/flac-1.3.3/doc/html/Makefile.in | 4 ++-- .../SDL2_mixer/external/opus-1.3.1/doc/Makefile.in | 2 +- singe/util.c | 4 +++- 9 files changed, 23 insertions(+), 17 deletions(-) diff --git a/singe/buildPrerequisites.sh b/singe/buildPrerequisites.sh index b2c171d3b..2989dea90 100755 --- a/singe/buildPrerequisites.sh +++ b/singe/buildPrerequisites.sh @@ -395,6 +395,7 @@ autoBuild libtiff.a SDL2_image/external/tiff-4.1.0 autoBuild libwebp.a SDL2_image/external/libwebp-1.0.3 # === PNG === +MORE_CFLAGS="-DPNG_NO_CONSOLE_IO" autoBuild libpng.a SDL2_image/external/libpng-1.6.37 "--with-zlib-prefix=\"${G_INSTALLED}\"" # === JPEG === @@ -585,7 +586,8 @@ fi pushd "${G_PROJECT}" -rm font.h icon.h kangarooPunchLogo.h singeLogo.h laserDisc.h magnifyingGlass.h indexing.h Framework_singe.h controls_cfg.h Menu_singe.h || true +# Force the following content to be rebuilt +rm font.h icon.h kangarooPunchLogo.h singeLogo.h laserDisc.h magnifyingGlass.h indexing.h Framework_singe.h controls_cfg.h Menu_singe.h FreeSansBold_ttf.h menuBackground_mkv.h Manual_pdf.h || true # === Overlay Font === createEmbeddedImage font @@ -626,15 +628,17 @@ if [[ ! -f menuBackground_mkv.h ]]; then ffmpeg -i 180503_01_PurpleGrid.mp4 -filter:v 'crop=ih/3*4:ih' -vf scale=720:480 -c:v libx264 -c:a aac temp2.mkv ffmpeg -f concat -safe 0 -i <(echo -e "file $PWD/temp1.mkv\nfile $PWD/temp2.mkv\n") -c copy menuBackground.mkv createEmbeddedBinary menuBackground.mkv menuBackground_mkv.h MENUBACKGROUND_MKV_H - rm temp1.mkv temp2.mkv # menuBackground.mkv + rm temp1.mkv temp2.mkv menuBackground.mkv fi popd # === Singe Manual === #libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to pdf:writer_pdf_Export Manual.odt +documentbuilder makePDFs.docbuilder +mv /tmp/Manual.pdf . createEmbeddedBinary Manual.pdf Manual_pdf.h MANUAL_H -#rm Manual.pdf +rm Manual.pdf # Clean Uo case "${G_PLATFORM}" in diff --git a/singe/buildRelease.sh b/singe/buildRelease.sh index 2b07b90e0..7c09070c1 100755 --- a/singe/buildRelease.sh +++ b/singe/buildRelease.sh @@ -63,9 +63,9 @@ function doBuild() { # 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}..." - #${CROSS}-strip "${TARGET}" - #upx -9 "${TARGET}" + echo "Compressing ${TARGET}..." + ${CROSS}-strip "${TARGET}" + upx -9 "${TARGET}" cd .. rm -rf temp diff --git a/singe/buildTheWorld.sh b/singe/buildTheWorld.sh index 8084fe1a3..3728c91d3 100755 --- a/singe/buildTheWorld.sh +++ b/singe/buildTheWorld.sh @@ -23,7 +23,7 @@ function buildDependencies() { local BITS=$1 local PLATFORM=$2 - ./buildPrerequisites.sh "$(pwd)/thirdparty" "$(pwd)/../thirdparty-build" ${BITS} ${PLATFORM} static "$(pwd)" + ./buildPrerequisites.sh "$(pwd)/thirdparty" "$(pwd)/../thirdparty-build" ${BITS} ${PLATFORM} static "$(pwd)" 2>&1 | tee "$(pwd)/../deps-${PLATFORM}-${BITS}.log" } diff --git a/singe/singe.c b/singe/singe.c index 6ed0695bb..ced22355e 100644 --- a/singe/singe.c +++ b/singe/singe.c @@ -3731,7 +3731,7 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, ConfigT *conf) { doIndexDisplay(-2); // Should we resize the window? - if (conf->resolutionWasCalculated) { + if (conf->resolutionWasCalculated && !conf->fullScreen && !conf->fullScreenWindow) { // Is the video wider than the display window? if ((videoGetWidth(_global.videoHandle) / videoGetHeight(_global.videoHandle)) > (conf->xResolution / conf->yResolution)) { // Find new window height diff --git a/singe/singe.h b/singe/singe.h index 26a6dc3e5..94083c477 100644 --- a/singe/singe.h +++ b/singe/singe.h @@ -31,7 +31,7 @@ // Don't forget to update singe.rc! #define SINGE_VERSION 2.00 -#define VERSION_STRING "v2.00b16" +#define VERSION_STRING "v2.00b17" #define COPYRIGHT_END_YEAR "2020" diff --git a/singe/singe.rc b/singe/singe.rc index 14876f354..41245d1e0 100644 --- a/singe/singe.rc +++ b/singe/singe.rc @@ -1,7 +1,7 @@ 101 ICON "/tmp/icon.ico" 1 VERSIONINFO -FILEVERSION 2,0,0,16 -PRODUCTVERSION 2,0,0,16 +FILEVERSION 2,0,0,17 +PRODUCTVERSION 2,0,0,17 BEGIN BLOCK "StringFileInfo" BEGIN @@ -9,12 +9,12 @@ BEGIN BEGIN VALUE "CompanyName", "Kangaroo Punch Studios" VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine" - VALUE "FileVersion", "2.00b16" + VALUE "FileVersion", "2.00b17" VALUE "InternalName", "Singe" VALUE "LegalCopyright", "Copyright 2006-2020 Scott C. Duensing" VALUE "OriginalFilename", "singe.exe" VALUE "ProductName", "Singe" - VALUE "ProductVersion", "2.00b16" + VALUE "ProductVersion", "2.00b17" END END BLOCK "VarFileInfo" diff --git a/singe/thirdparty/SDL2_mixer/external/flac-1.3.3/doc/html/Makefile.in b/singe/thirdparty/SDL2_mixer/external/flac-1.3.3/doc/html/Makefile.in index 65de627fd..481fee20c 100644 --- a/singe/thirdparty/SDL2_mixer/external/flac-1.3.3/doc/html/Makefile.in +++ b/singe/thirdparty/SDL2_mixer/external/flac-1.3.3/doc/html/Makefile.in @@ -667,9 +667,9 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@FLaC__HAS_DOXYGEN_FALSE@install-data-local: -@FLaC__HAS_DOXYGEN_FALSE@distclean-local: @FLaC__HAS_DOXYGEN_FALSE@uninstall-local: +@FLaC__HAS_DOXYGEN_FALSE@distclean-local: +@FLaC__HAS_DOXYGEN_FALSE@install-data-local: clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am diff --git a/singe/thirdparty/SDL2_mixer/external/opus-1.3.1/doc/Makefile.in b/singe/thirdparty/SDL2_mixer/external/opus-1.3.1/doc/Makefile.in index e6957b6d8..102eee49f 100644 --- a/singe/thirdparty/SDL2_mixer/external/opus-1.3.1/doc/Makefile.in +++ b/singe/thirdparty/SDL2_mixer/external/opus-1.3.1/doc/Makefile.in @@ -394,9 +394,9 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@HAVE_DOXYGEN_FALSE@install-data-local: @HAVE_DOXYGEN_FALSE@uninstall-local: @HAVE_DOXYGEN_FALSE@clean-local: -@HAVE_DOXYGEN_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff --git a/singe/util.c b/singe/util.c index a671439d5..00a873994 100644 --- a/singe/util.c +++ b/singe/util.c @@ -43,6 +43,7 @@ static const int CONSOLE_LINES = 1000; static bool _consoleEnabled = true; +static bool _outputHappened = false; static FILE *_utilTraceFile = NULL; @@ -169,7 +170,7 @@ void utilFixPathSeparators(char **path, bool slash) { bool utilGetConsoleEnabled(void) { - return _consoleEnabled; + return _consoleEnabled && _outputHappened; } @@ -436,6 +437,7 @@ void utilSay(char *fmt, ...) { va_end(args); printf("\n"); fflush(stdout); + _outputHappened = true; } }