Window resizing now checks if it's really a window.

This commit is contained in:
Scott Duensing 2020-05-04 18:52:25 -05:00
parent 98a9014f3f
commit 511e6d4c28
9 changed files with 23 additions and 17 deletions

View file

@ -395,6 +395,7 @@ autoBuild libtiff.a SDL2_image/external/tiff-4.1.0
autoBuild libwebp.a SDL2_image/external/libwebp-1.0.3 autoBuild libwebp.a SDL2_image/external/libwebp-1.0.3
# === PNG === # === PNG ===
MORE_CFLAGS="-DPNG_NO_CONSOLE_IO"
autoBuild libpng.a SDL2_image/external/libpng-1.6.37 "--with-zlib-prefix=\"${G_INSTALLED}\"" autoBuild libpng.a SDL2_image/external/libpng-1.6.37 "--with-zlib-prefix=\"${G_INSTALLED}\""
# === JPEG === # === JPEG ===
@ -585,7 +586,8 @@ fi
pushd "${G_PROJECT}" 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 === # === Overlay Font ===
createEmbeddedImage 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 -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 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 createEmbeddedBinary menuBackground.mkv menuBackground_mkv.h MENUBACKGROUND_MKV_H
rm temp1.mkv temp2.mkv # menuBackground.mkv rm temp1.mkv temp2.mkv menuBackground.mkv
fi fi
popd popd
# === Singe Manual === # === Singe Manual ===
#libreoffice --headless "-env:UserInstallation=file:///tmp/LibreOffice_Conversion_${USER}" --convert-to pdf:writer_pdf_Export Manual.odt #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 createEmbeddedBinary Manual.pdf Manual_pdf.h MANUAL_H
#rm Manual.pdf rm Manual.pdf
# Clean Uo # Clean Uo
case "${G_PLATFORM}" in case "${G_PLATFORM}" in

View file

@ -63,9 +63,9 @@ function doBuild() {
# The grep nonsense hides a warning we don't care about. # 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 ${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}"
cd .. cd ..
rm -rf temp rm -rf temp

View file

@ -23,7 +23,7 @@
function buildDependencies() { function buildDependencies() {
local BITS=$1 local BITS=$1
local PLATFORM=$2 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"
} }

View file

@ -3731,7 +3731,7 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, ConfigT *conf) {
doIndexDisplay(-2); doIndexDisplay(-2);
// Should we resize the window? // Should we resize the window?
if (conf->resolutionWasCalculated) { if (conf->resolutionWasCalculated && !conf->fullScreen && !conf->fullScreenWindow) {
// Is the video wider than the display window? // Is the video wider than the display window?
if ((videoGetWidth(_global.videoHandle) / videoGetHeight(_global.videoHandle)) > (conf->xResolution / conf->yResolution)) { if ((videoGetWidth(_global.videoHandle) / videoGetHeight(_global.videoHandle)) > (conf->xResolution / conf->yResolution)) {
// Find new window height // Find new window height

View file

@ -31,7 +31,7 @@
// Don't forget to update singe.rc! // Don't forget to update singe.rc!
#define SINGE_VERSION 2.00 #define SINGE_VERSION 2.00
#define VERSION_STRING "v2.00b16" #define VERSION_STRING "v2.00b17"
#define COPYRIGHT_END_YEAR "2020" #define COPYRIGHT_END_YEAR "2020"

View file

@ -1,7 +1,7 @@
101 ICON "/tmp/icon.ico" 101 ICON "/tmp/icon.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,0,0,16 FILEVERSION 2,0,0,17
PRODUCTVERSION 2,0,0,16 PRODUCTVERSION 2,0,0,17
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
@ -9,12 +9,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "Kangaroo Punch Studios" VALUE "CompanyName", "Kangaroo Punch Studios"
VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine" VALUE "FileDescription", "Somewhat Interactive Nostalgic Game Engine"
VALUE "FileVersion", "2.00b16" VALUE "FileVersion", "2.00b17"
VALUE "InternalName", "Singe" VALUE "InternalName", "Singe"
VALUE "LegalCopyright", "Copyright 2006-2020 Scott C. Duensing" VALUE "LegalCopyright", "Copyright 2006-2020 Scott C. Duensing"
VALUE "OriginalFilename", "singe.exe" VALUE "OriginalFilename", "singe.exe"
VALUE "ProductName", "Singe" VALUE "ProductName", "Singe"
VALUE "ProductVersion", "2.00b16" VALUE "ProductVersion", "2.00b17"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -667,9 +667,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."
@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:
@FLaC__HAS_DOXYGEN_FALSE@distclean-local:
@FLaC__HAS_DOXYGEN_FALSE@install-data-local:
clean: clean-recursive clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am clean-am: clean-generic clean-libtool mostlyclean-am

View file

@ -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@uninstall-local: @HAVE_DOXYGEN_FALSE@uninstall-local:
@HAVE_DOXYGEN_FALSE@clean-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

View file

@ -43,6 +43,7 @@ static const int CONSOLE_LINES = 1000;
static bool _consoleEnabled = true; static bool _consoleEnabled = true;
static bool _outputHappened = false;
static FILE *_utilTraceFile = NULL; static FILE *_utilTraceFile = NULL;
@ -169,7 +170,7 @@ void utilFixPathSeparators(char **path, bool slash) {
bool utilGetConsoleEnabled(void) { bool utilGetConsoleEnabled(void) {
return _consoleEnabled; return _consoleEnabled && _outputHappened;
} }
@ -436,6 +437,7 @@ void utilSay(char *fmt, ...) {
va_end(args); va_end(args);
printf("\n"); printf("\n");
fflush(stdout); fflush(stdout);
_outputHappened = true;
} }
} }