diff --git a/.gitignore b/.gitignore index c96ba8b72..f64754ad5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ projects/android-project-ant/gen projects/android-project-ant/assets projects/android-project-ant/libs src/examples/strobe -src/thirdparty/SDL2-2.0.10* +src/thirdparty/SDL2-2.0.12* *.dll bin/ee* bin/eepp-* @@ -44,3 +44,4 @@ bin/libeepp.dylib eepp.kdev4 eepp.tags eepp.geany +/bin/assets/icon/ee.aps diff --git a/bin/assets/icon/ee.ico b/bin/assets/icon/ee.ico index 47dd3fd14..df9268206 100644 Binary files a/bin/assets/icon/ee.ico and b/bin/assets/icon/ee.ico differ diff --git a/premake5.lua b/premake5.lua index cc7cec7b8..8061f620d 100644 --- a/premake5.lua +++ b/premake5.lua @@ -196,6 +196,10 @@ function build_link_configuration( package_name, use_ee_icon ) linkoptions { "../../bin/assets/icon/ee.res" } end + filter { "system:windows", "action:vs*" } + files { "bin/assets/icon/ee.rc", "bin/assets/icon/ee.ico" } + vpaths { ['Resources/*'] = { "ee.rc", "ee.ico" } } + filter "action:not vs*" cppdialect "C++14" buildoptions { "-Wall" } @@ -568,6 +572,9 @@ workspace "eepp" filter "configurations:release*" optimize "Speed" + filter { "system:windows", "action:vs*" } + flags { "MultiProcessorCompile" } + project "SOIL2-static" kind "StaticLib" language "C" diff --git a/projects/ios/SDL2-sensors.patch b/projects/ios/SDL2-sensors.patch deleted file mode 100644 index 29a8d4e72..000000000 --- a/projects/ios/SDL2-sensors.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/configure Mon Dec 30 17:56:56 2019 -0800 -+++ b/configure Tue Dec 31 10:40:30 2019 -0800 -@@ -25106,6 +25106,14 @@ - # have_haptic=yes - # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback" - #fi -+ # Set up files for the sensor library -+ if test x$enable_sensor = xyes; then -+ -+$as_echo "#define SDL_SENSOR_COREMOTION 1" >>confdefs.h -+ -+ SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m" -+ have_sensor=yes -+ fi - # Set up files for the power library - if test x$enable_power = xyes; then - - ---- a/configure.ac Mon Dec 30 17:56:56 2019 -0800 -+++ b/configure.ac Tue Dec 31 10:40:30 2019 -0800 -@@ -3856,6 +3856,12 @@ - # have_haptic=yes - # EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback" - #fi -+ # Set up files for the sensor library -+ if test x$enable_sensor = xyes; then -+ AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ]) -+ SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m" -+ have_sensor=yes -+ fi - # Set up files for the power library - if test x$enable_power = xyes; then - AC_DEFINE(SDL_POWER_UIKIT, 1, [ ]) diff --git a/projects/ios/compile-all.sh b/projects/ios/compile-all.sh index 0783040bb..209bf16a1 100755 --- a/projects/ios/compile-all.sh +++ b/projects/ios/compile-all.sh @@ -3,7 +3,7 @@ cd $(dirname "$0") if [ ! -f ../../libs/ios/libSDL2.a ]; then -cd ../../src/thirdparty/SDL2-2.0.10/build-scripts +cd ../../src/thirdparty/SDL2-2.0.12/build-scripts ./iosbuild.sh cp lib/libSDL2.a ../../../../libs/ios/ cd ../../../../projects/ios diff --git a/projects/ios/gen-xcode4-proj.sh b/projects/ios/gen-xcode4-proj.sh index ede9451ab..05a4c33b3 100755 --- a/projects/ios/gen-xcode4-proj.sh +++ b/projects/ios/gen-xcode4-proj.sh @@ -1,11 +1,11 @@ #!/bin/bash -premake5 --file=../../premake5.lua --os=ios --with-static-eepp --with-gles1 --with-gles2 --with-static-backend --use-frameworks xcode4 +premake5 --file=../../premake5.lua --os=ios --with-static-eepp --with-gles1 --with-gles2 --with-static-backend --use-frameworks xcode4 cp Info.plist ../../make/ios if [ ! -f ../../libs/ios/libSDL2.a ]; then -cd ../../src/thirdparty/SDL2-2.0.10/build-scripts +cd ../../src/thirdparty/SDL2-2.0.12/build-scripts ./iosbuild.sh cp lib/libSDL2.a ../../../../libs/ios/ diff --git a/src/eepp/core/debug.cpp b/src/eepp/core/debug.cpp index f904aa03d..ece39226d 100644 --- a/src/eepp/core/debug.cpp +++ b/src/eepp/core/debug.cpp @@ -18,12 +18,10 @@ namespace EE { bool PrintDebugInLog = true; void eeREPORT_ASSERT( const char* File, int Line, const char* Exp ) { -#ifdef EE_COMPILER_MSVC - +#if defined( EE_COMPILER_MSVC ) && defined( EE_DEBUG ) _CrtDbgReport( _CRT_ASSERT, File, Line, "", Exp ); DebugBreak(); - #else if ( PrintDebugInLog ) { diff --git a/src/eepp/system/sys.cpp b/src/eepp/system/sys.cpp index fceb2c92d..f73a33990 100644 --- a/src/eepp/system/sys.cpp +++ b/src/eepp/system/sys.cpp @@ -606,7 +606,7 @@ std::string Sys::getConfigPath( std::string appname ) { _dupenv_s( &ppath, &ssize, "APPDATA" ); - String::strCopy( path, ppath, EE_MAX_CFG_PATH_LEN ); + _snprintf( path, EE_MAX_CFG_PATH_LEN, "%s\\%s", ppath, appname.c_str() ); free( ppath ); diff --git a/src/eepp/window/backend/SDL2/windowsdl2.cpp b/src/eepp/window/backend/SDL2/windowsdl2.cpp index 35d2834bd..7115eeb41 100644 --- a/src/eepp/window/backend/SDL2/windowsdl2.cpp +++ b/src/eepp/window/backend/SDL2/windowsdl2.cpp @@ -695,6 +695,11 @@ bool WindowSDL::setIcon( const std::string& Path ) { Image Img( Path ); if ( NULL != Img.getPixelsPtr() ) { +#if EE_PLATFORM == EE_PLATFORM_WIN + if ( Img.getWidth() > 64 || Img.getHeight() > 64 ) { + Img.resize( 64, 64 ); + } +#endif const Uint8* Ptr = Img.getPixelsPtr(); x = Img.getWidth(); y = Img.getHeight(); diff --git a/src/tools/codeeditor/codeeditor.cpp b/src/tools/codeeditor/codeeditor.cpp index 4af1b18a5..e4522c282 100644 --- a/src/tools/codeeditor/codeeditor.cpp +++ b/src/tools/codeeditor/codeeditor.cpp @@ -248,8 +248,7 @@ void App::loadConfig() { mRecentFiles = String::split( recent, ';' ); mInitColorScheme = mConfig.editor.colorScheme = mIni.getValue( "editor", "colorscheme", "lite" ); - mConfig.editor.fontSize = - mIni.getValue( "editor", "font_size", mDisplayDPI > 105 ? "11dp" : "14dp" ); + mConfig.editor.fontSize = mIni.getValue( "editor", "font_size", "11dp" ); mConfig.window.size.setWidth( mIniState.getValueI( "window", "width", mDisplayDPI > 105 ? 1920 : 1280 ) ); mConfig.window.size.setHeight( @@ -264,7 +263,7 @@ void App::loadConfig() { mConfig.editor.highlightCurrentLine = mIni.getValueB( "editor", "highlight_current_line", true ); mConfig.editor.horizontalScrollbar = mIni.getValueB( "editor", "horizontal_scrollbar", false ); - mConfig.ui.fontSize = mIni.getValue( "ui", "font_size", mDisplayDPI > 105 ? "11dp" : "14dp" ); + mConfig.ui.fontSize = mIni.getValue( "ui", "font_size", "11dp" ); mConfig.editor.trimTrailingWhitespaces = mIni.getValueB( "editor", "trim_trailing_whitespaces", false ); mConfig.editor.forceNewLineAtEndOfFile =