diff --git a/CMake/Packages/FindAndroidSwappy.cmake b/CMake/Packages/FindAndroidSwappy.cmake index 0ab2e6f3c44..a29d7c24036 100644 --- a/CMake/Packages/FindAndroidSwappy.cmake +++ b/CMake/Packages/FindAndroidSwappy.cmake @@ -40,7 +40,7 @@ use_pkgconfig(AndroidSwappy_PKGC AndroidSwappy) findpkg_framework(AndroidSwappy) -find_path(AndroidSwappy_INCLUDE_DIR NAMES swappyVk.h HINTS ${AndroidSwappy_FRAMEWORK_INCLUDES} ${AndroidSwappy_INC_SEARCH_PATH} ${AndroidSwappy_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "swappy") +find_path(AndroidSwappy_INCLUDE_DIR NAMES swappyVk.h HINTS ${AndroidSwappy_FRAMEWORK_INCLUDES} ${AndroidSwappy_INC_SEARCH_PATH} ${AndroidSwappy_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "swappy" "swappy/swappy") find_library(AndroidSwappy_LIBRARY NAMES swappy_static HINTS ${AndroidSwappy_LIB_SEARCH_PATH} ${AndroidSwappy_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel debug) findpkg_finish(AndroidSwappy) diff --git a/Samples/2.0/AndroidAppTemplate/Template/app/src/main/jni/AndroidMain.cpp b/Samples/2.0/AndroidAppTemplate/Template/app/src/main/jni/AndroidMain.cpp index 985292b8af0..20999e10218 100644 --- a/Samples/2.0/AndroidAppTemplate/Template/app/src/main/jni/AndroidMain.cpp +++ b/Samples/2.0/AndroidAppTemplate/Template/app/src/main/jni/AndroidMain.cpp @@ -198,6 +198,20 @@ void android_main( struct android_app *app ) Demo::AndroidSystems::setAndroidApp( app ); Demo::AndroidSystems::setJniProvider( &g_demoJniProvider ); + // !!! IMPORTANT !!! + // + // Swappy defaults to AutoVSyncInterval_AutoPipeline. + // But we change it to PipelineForcedOn because it's the behavior most users coming from PC + // expect (AutoVSyncInterval_AutoPipeline can be counter-intuitive because it can lock the + // pacing to lower framerates) + // + // What actual setting you wish to use (or expose to user) depends on how much love, + // testing & optimization you put into your Android app. + // + // !!! IMPORTANT !!! + Ogre::VulkanAndroidWindow::setFramePacingSwappyAutoMode( + Ogre::VulkanAndroidWindow::PipelineForcedOn ); + // Used to poll the events in the main loop int events; android_poll_source *source;