Commit Graph

356 Commits

Author SHA1 Message Date
Deal 004065a054
Rename ax::Ref ==> ax::Object (#1877)
* Rename ax::Ref ==> ax::Object

* Update Object.h [skip ci]
2024-05-03 22:15:08 +08:00
halx99 13a7258150 Remove unused files[skip ci] 2024-05-02 15:56:04 +08:00
smilediver d845e54b49
Fix FileUtils on macOS (#1863)
* Fix FileUtils::getFileSize() not returning -1 when file is not found

* Fix FileUtils::fullPathForDirectory() not appending a trailing slash

* Fix `not` and `and` keyword usage

* Fix FileUtils::getDefaultResourceRootPath() returning nothing on macOS

* Fix FileUtils::isFileExist() returning true for directories on macOS
2024-04-30 20:03:58 +08:00
RH f20be6ab95
Ensure the window size is correct (#1855) 2024-04-27 03:09:52 +08:00
Deal aed58e6c28
Cleanup cc stubs (#1847)
* Cleanup cc stubs

1. Rename ax::ccMessageBox to ax::messageBox
2. Remove unused API: ax::LuaLog
3. Move ax::ccNextPOT to ax::utils::nextPOT

* Improve code style [skip ci]
2024-04-25 00:51:00 +08:00
RH 3916a2367b
Cross-platform media controller for video playback (#1845)
* Initial work on media controller

* Media player controller for WMF media engine

* Add getDuration and getCurrentTime methods to media engines

* Fix compilation

* Fix Android media timeline issues

* Fix compilation issue

* Fix WinRT compilation issue

* Fix compilation issue

* Add missing header include

* Make it simpler to create a custom media controller

* Ensure the basic media controller widget size is the same size as the media player on initialization

* Add dark media control underlay to give more contrast to the controls
ADd copyright notices

* Removing existing media controller from parent if required

* Adjust for view scaling since embedded resources are created for a scale of 1.

* Scale central media controls if required on content size change

* Remove pointless fast forward and fast reverse buttons
Ensure media controller correctly resizes on full-screen media playback

* Allow enable vlc on windows

* Improve media macro detect

* Add media controls drawn by DrawNode into single texture
Add fullscreen enter and exit controls
setUserInputEnabled and isUserInputEnabled replaced by setMediaControllerEnabled and isMediaControllerEnabled

* Update function calls to new names

* Revert back to setUserInputEnabled and isUserInputEnabled

* Remove embedded circle image and create it with DrawNode

* Change radius of drawn circle to half the total image size

---------

Co-authored-by: halx99 <halx99@live.com>
2024-04-24 22:28:59 +08:00
Deal 74612ef296
Remove deprecated pixel formats L8, A8, LA8 (#1839)
* Remove deprecated pixel formats

* Fix ci

* Fixup [skip ci]

* Fixup [skip ci]

* Update tests [skip ci]
2024-04-20 22:29:16 +08:00
halx99 a22e56b0ea Update android media3 to 1.2.1 2024-04-18 23:33:39 +08:00
Deal 1cfe6fcb3f
Improve MediaPlayer: handle video rotation properly (#1823)
* Improve MediaPlayer: handle video rotation properly

* Fix nativeHandleVideoSample prototype

* Fixup

* Fixup
2024-04-18 04:06:53 +08:00
smilediver 37d9a0db0b
Fix FileUtilsApple::getPathForDirectory() checking wrong path (#1828) 2024-04-17 22:36:51 +08:00
Tyelor D. Klein 7a9dea4f6f
[Improvement] Add Borderless Windowed Mode (#1826)
This PR adds borderless windowed mode support to the GLViewImpl class. For backwards compatibility the setWindowed function uses a default parameter of 'false' for borderless.
2024-04-17 09:33:55 +08:00
halx99 68a5c250cd Fix build android with axmol cmdline arch not working 2024-04-09 01:37:04 +08:00
halx99 195d0e7984 Make FileStream open file for write share flags same with cstd 2024-04-06 22:47:00 +08:00
Deal bf7635fe63
Add CMake option to remove Console from builds (#1788)
* Add CMake option to remove Console from builds

- option: AX_ENABLE_CONSOLE

* Fix ci
2024-04-05 14:25:22 +08:00
halx99 c80fc1a8be Avoid dead loop when enable enableRetina 2024-04-05 01:55:19 +08:00
halx99 9b25809898 Improve code style 2024-04-05 01:44:41 +08:00
halx99 3bcb13f22a Fix #1787 2024-04-05 01:20:44 +08:00
halx99 4d89b04850 Move Logging APIs from Console.h/Console.cpp to Logging.h/Logging.cpp 2024-04-03 21:03:40 +08:00
halx99 3555f97a7b Fix ci 2024-03-24 05:20:59 +08:00
宾晓皎 f211ba248c
[wasm] Fix frame rate control (#1762) 2024-03-22 18:10:59 +08:00
halx99 d1ec623bb5 Rename folder thirdparty ==> 3rdparty 2024-03-19 21:33:02 +08:00
RH cdf69d159a
Removing EditBox should not result in logging an error message (#1740)
* Removing EditBox should not result in logging an error message

* Add copyright notice
2024-03-13 12:37:33 +08:00
halx99 601434965a Fix wasm error 2024-03-12 21:50:14 +08:00
halx99 7c7d3beb02 Improve wasm logging color style 2024-03-11 23:32:34 +08:00
halx99 6a57a020da Strip ansi color escape for wasm 2024-03-11 01:22:48 +08:00
Deal 931ca91c71
Logging colorful support (#1735)
* Add logging colorful support

* Enable full log fmt style in cpp-tests
2024-03-08 01:15:26 +08:00
Deal 5d2c42e73f
Implement new axmol log system based on fmtlib (#1732)
* Implement new log macros based on fmtlib

* Fix ci

* Fix ci

* Fix android ci

* Fix warnings

* Replace more ax::log by AXLOGX

* Fix ci

* Fix linux build

* Use stack memory for log prefix

* Fix linux build

* Fix warning

* Add ILogOutput support

* Replace old log calls with new log macros

* Fixup

* Fixup

* Fixup

* Update ci msvc to 14.39

* Update Console.h [skip ci]

* Pass log level to ILogOutput
2024-03-07 08:47:00 +08:00
smilediver fcf18f8fc5
Android build fixes (#1723)
* Try default macOS Android SDK location if SDK is not specified or found

* Fix Android Studio project sync failing if NDK is not installed
2024-02-28 23:50:15 +08:00
halx99 8b33156e65 Update glfw to 3.4 2024-02-24 14:17:31 +08:00
RH 184e0dcc74
Allow overriding defines without modifying engine source (#1710) 2024-02-21 09:40:04 +08:00
Deal 31da0f2917
Improve dll support (#1706)
* Improve dll support

* Tidy header include path

* Fix android build & symbol dup issue

* Fix android compile error

* Fixup
2024-02-20 05:37:12 +08:00
Deal adbffdf4a2
Fix #1704, control android cmake options by engine axutils.gradle (#1705) 2024-02-20 00:58:47 +08:00
j-jorge 628574c905
Remove the Enhance API. (#1690)
We don't have the source for it anyway.
2024-02-19 10:39:26 +08:00
Lich 8e2e577e2f
Add support for window close button calback (#1697) 2024-02-18 16:08:53 +08:00
halx99 6477a8fdb4 Improve naming style 2024-02-18 10:30:11 +08:00
Deal 2d9c6dbf90
Fix view size incorrect when frameZoomFactor not 1.0 (#1694)
* Fix view size incorrect when frameZoomFactor not 1.0

* Tidy code
2024-02-18 09:25:28 +08:00
Deal cd5a39ee3b
Fix screen size incorrect in retina display (#1692) 2024-02-17 13:38:27 +08:00
RH bee2d6222d
Trim leading and trailing whitespace characters for the HTML parsing option (#1687) 2024-02-15 14:51:42 +08:00
RH d117232769
Ensure correct video mode is set when creating view to avoid incorrect refresh rate being applied (#1678) 2024-02-13 21:10:41 +08:00
j-jorge 583dcdc111
Use different global names and #undef the #defines to stay unity build friendly. (#1653) 2024-02-06 07:39:54 +08:00
halx99 e278e45ab8 Fix ci 2024-02-02 00:42:42 +08:00
Deal 9774d4751c
Fix memory leaks refreshed (#1638)
* Fix memory leaks when axmol apps exit on non-embed systems

    1. DriverBase no destroyInstance
    2. Every object inherited from ax::Ref shoud destory before ScriptEngineManager, otherwise will trigger it's reinit and leak
    3.  QuadCommand always leak isolated indices
    4. static singleton should'nt inhert from ax::Ref due to destory it before ScriptEngineManager impossible
    5. Make Director don't inherit from ax::Ref due to it also cause ScriptEngineManager re-init, because we destroy ScriptEngineManger in destructor of Director
    6. Explicit Director managed by Application and don't delete self at purgeDirector, since it will release at mainLoop and re-init in glView->pollEvents then leak
    7. Rename ApplicationProtocol to ApplicationBase
    8. Rename purgeDirector since we don't delete director self at it, maye rename to cleanup
    9. Change ShaderCache to new/delete singleton, managed by ProgramManager

---------

Co-authored-by: lich426 <lich426@gmail.com>
2024-01-29 22:30:14 +08:00
halx99 c06bed508b Rename cocos_android_app_init to axmol_android_app_init and othre code cleanup 2024-01-29 08:51:35 +08:00
罗捷捷 e412419425
Move FileUtils::fullPathForDirectory to public (#1596) 2024-01-11 12:42:00 +08:00
suleiman rabiei d69aa07a24
Fix crash with view nullcheck (#1540) 2023-12-24 19:40:09 +08:00
halx99 ef40b03c87 Delete unused win32/compat/stdint.h 2023-12-18 23:12:47 +08:00
halx99 993b7f54c2 Improve win32 timer resolution control 2023-12-16 00:45:54 +08:00
Deal b88c28013c
GLES3: Fix scalar array layout (#1523) 2023-12-15 22:29:23 +08:00
RH 2b01fa2cb3
Make openFileStream a const method (#1514) 2023-12-14 01:51:15 +08:00
Lich ae51e26eb6
Add support for window resized and positioned (#1513) 2023-12-14 01:48:52 +08:00