V3.5.0 create window (#10481)

* 1. Modify the parameters of the creation window
2. Modify the relationship between platform and interface
3. Rename vibrate to vibrator in linux and QNX

* Fix empty platform implementation

* Fix empty platform implementation

* Modify mac and ios createwindow interface

* Create a centered window by default

* Mobile platforms do not require window creation
This commit is contained in:
qiuguohua
2022-03-25 18:43:17 +08:00
committed by GitHub
parent 1f11536a1f
commit b6af1ada02
62 changed files with 419 additions and 762 deletions
@@ -27,12 +27,30 @@
#include "platform/android/AndroidPlatform.h"
#include "platform/java/jni/glue/JniNativeGlue.h"
#include "platform/java/modules/Accelerometer.h"
#include "platform/java/modules/Battery.h"
#include "platform/java/modules/Network.h"
#include "platform/java/modules/SystemWindow.h"
#include "platform/java/modules/Vibrator.h"
#include "modules/Screen.h"
#include "modules/System.h"
namespace cc {
AndroidPlatform::AndroidPlatform() {
_jniNativeGlue = JNI_NATIVE_GLUE();
}
int AndroidPlatform::init() {
registerInterface(std::make_shared<Accelerometer>());
registerInterface(std::make_shared<Battery>());
registerInterface(std::make_shared<Network>());
registerInterface(std::make_shared<Screen>());
registerInterface(std::make_shared<System>());
registerInterface(std::make_shared<SystemWindow>());
registerInterface(std::make_shared<Vibrator>());
return 0;
}
int AndroidPlatform::getSdkVersion() const {
return _jniNativeGlue->getSdkVersion();
}