mirror of
https://github.com/cocos/cocos-engine.git
synced 2026-09-03 14:20:22 +08:00
HarmonyOS Next implements game.end interface (#18473)
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "base/Log.h"
|
||||
#include "base/Macros.h"
|
||||
#include "platform/openharmony/OpenHarmonyPlatform.h"
|
||||
#include "platform/openharmony/napi/NapiHelper.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
@@ -76,6 +77,10 @@ void SystemWindow::setViewSize(uint32_t width, uint32_t height) {
|
||||
_height = height;
|
||||
}
|
||||
|
||||
void SystemWindow::closeWindow() {
|
||||
NapiHelper::napiCallFunction("terminateProcess");
|
||||
}
|
||||
|
||||
SystemWindow::Size SystemWindow::getViewSize() const {
|
||||
return Size{static_cast<float>(_width),
|
||||
static_cast<float>(_height)};
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
void setWindowHandle(void* window);
|
||||
Size getViewSize() const override;
|
||||
void setViewSize(uint32_t width, uint32_t height) override;
|
||||
|
||||
void closeWindow() override;
|
||||
/**
|
||||
@brief enable/disable(lock) the cursor, default is enabled
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user