Skip to content

Commit a4cafa3

Browse files
committed
Merge branch 'release/2.x' into dev
2 parents be8f199 + 2b9fba8 commit a4cafa3

File tree

18 files changed

+56
-30
lines changed

18 files changed

+56
-30
lines changed

3rdparty/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ endif()
237237

238238
if(AX_ENABLE_AUDIO)
239239
# The openal-soft(LGPL 2.1)
240-
if(AX_USE_ALSOFT)
240+
if(NOT EMSCRIPTEN)
241241
set(alsoft_opts
242242
"ALSOFT_DLOPEN OFF"
243243
"ALSOFT_UTILS OFF"
@@ -289,7 +289,6 @@ if(AX_ENABLE_AUDIO)
289289

290290
ax_add_3rd(openal EXCLUDE_FROM_ALL TARGETS OpenAL;alsoft.common OPTIONS ${alsoft_opts})
291291

292-
target_compile_definitions(3rdparty INTERFACE AX_USE_ALSOFT=1)
293292
set_target_properties(OpenAL alsoft.common PROPERTIES CXX_STANDARD ${_AX_CXX_STD})
294293

295294
if(AX_USE_ALSOFT_STATIC)

3rdparty/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
## curl
4444
- [![Upstream](https://img.shields.io/github/v/release/curl/curl?label=Upstream)](https://github.com/curl/curl)
45-
- Version: 8.16.0
45+
- Version: 8.17.0
4646
- License: Curl (MIT/X)
4747

4848
## doctest
@@ -124,7 +124,7 @@
124124

125125
- luajit
126126
- Upstream: https://github.com/LuaJIT/LuaJIT
127-
- Version: 2.1-871db2c
127+
- Version: 2.1-68354f4
128128
- License: MIT
129129

130130
- tolua

CMakeOptions.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
- AX_ENABLE_VR: whether to enable generic VR renderer support, status: `experimental`, default: `FALSE`
1919
- AX_ENABLE_WAYLAND: whether to enable linux wayland, default: `FALSE`
2020
- AX_USE_XXX:
21-
- AX_USE_ALSOFT: whether use openal-soft for all platforms
22-
- Apple platform: Use openal-soft instead system deprecated: `OpenAL.framework`
23-
- Other platforms: Always use openal-soft even this option not enabled
2421
- AX_USE_LUAJIT: whether use luajit, default: `FALSE`, use plainlua
2522
- AX_ENABLE_EXT_XXX for extensions
2623
- AX_ENABLE_EXT_GUI: the traditional GUI extension, default: `TRUE`

axmol/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ cmake_dependent_option(AX_ENABLE_VLC_MEDIA "Enabling vlc media" OFF "(WIN32 AND
126126

127127
cmake_dependent_option(AX_ENABLE_WAYLAND "Enabling linux wayland" OFF "LINUX" OFF)
128128

129-
if(NOT APPLE AND(NOT EMSCRIPTEN))
130-
set(AX_USE_ALSOFT ON CACHE BOOL "" FORCE)
131-
else()
132-
option(AX_USE_ALSOFT "Use ALSOFT on apple" OFF)
133-
endif()
134-
135129
option(AX_ENABLE_PHYSICS "Build Physics support" ON)
136130
cmake_dependent_option(AX_ENABLE_MEDIA "Build media support" ON "AX_ENABLE_MFMEDIA OR AX_ENABLE_VLC_MEDIA OR APPLE OR ANDROID" OFF)
137131
option(AX_ENABLE_AUDIO "Build audio support" ON)

axmol/audio/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set(_AX_AUDIO_SRC
2424
audio/AudioEngineImpl.cpp
2525
)
2626

27-
if (AX_USE_ALSOFT)
27+
if (NOT EMSCRIPTEN)
2828
set(_AX_AUDIO_HEADER ${_AX_AUDIO_HEADER}
2929
audio/AudioEffectsExtension.h
3030
)

axmol/base/Director.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,9 @@ Scene* Director::popPreviousSceneOut()
998998

999999
void Director::end()
10001000
{
1001+
auto app = Application::getInstance();
1002+
if (app)
1003+
app->applicationWillQuit();
10011004
_cleanupDirectorInNextLoop = true;
10021005
}
10031006

axmol/platform/ApplicationBase.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ class AX_DLL ApplicationBase
9191
*/
9292
virtual void applicationWillEnterForeground() = 0;
9393

94+
/**
95+
* @brief This function will be called when the application is about to quit.
96+
* Typically triggered when the user clicks the close button or requests
97+
* to exit the application.
98+
* @return void
99+
* @lua NA
100+
* @since axmol-2.10.0
101+
*/
102+
virtual void applicationWillQuit() {};
103+
94104
/**
95105
* @brief Callback by Director for limit FPS.
96106
* @param interval The time, expressed in seconds, between current frame and next.

cmake/Modules/AXBuildHelpers.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ function(ax_setup_app_config app_name)
539539

540540
target_link_libraries(${app_name} ${_AX_EXTENSION_LIBS})
541541

542-
if(XCODE AND AX_ENABLE_AUDIO AND AX_USE_ALSOFT AND ALSOFT_OSX_FRAMEWORK)
542+
if(XCODE AND AX_ENABLE_AUDIO AND ALSOFT_OSX_FRAMEWORK)
543543
# Embedded soft_oal embedded framework
544544
# XCODE_LINK_BUILD_PHASE_MODE BUILT_ONLY
545545
# ???Xcode limition: XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY works for first app

cmake/Modules/AXConfigDepend.cmake

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ macro(ax_depend)
22
# confim the libs, prepare to link
33
set(PLATFORM_SPECIFIC_LIBS)
44

5-
message(STATUS "AX_USE_ALSOFT=${AX_USE_ALSOFT}")
6-
75
if(WINDOWS)
86
list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 userenv psapi winmm Version Iphlpapi)
97

@@ -51,14 +49,6 @@ macro(ax_depend)
5149
${COREMEDIA_LIBRARY}
5250
)
5351

54-
if(AX_ENABLE_AUDIO AND NOT AX_USE_ALSOFT)
55-
find_library(OPENAL_LIBRARY OpenAL)
56-
set(_AX_APPLE_LIBS
57-
${OPENAL_LIBRARY}
58-
${_AX_APPLE_LIBS}
59-
)
60-
endif()
61-
6252
if(MACOSX)
6353
list(APPEND PREBUILT_SPECIFIC_LIBS GLFW3)
6454

cmake/Modules/AXLinkHelpers.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ function(ax_link_cxx_prebuilt APP_NAME AX_ROOT_DIR AX_PREBUILT_DIR)
6161
target_compile_definitions(${APP_NAME} PRIVATE AX_GLES_PROFILE=0)
6262
endif()
6363

64-
ax_config_pred(${APP_NAME} AX_USE_ALSOFT)
6564
ax_config_pred(${APP_NAME} AX_ENABLE_MSEDGE_WEBVIEW2)
6665
ax_config_pred(${APP_NAME} AX_ENABLE_PHYSICS)
6766
ax_config_pred(${APP_NAME} AX_ENABLE_3D)

0 commit comments

Comments
 (0)