mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user