mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 02:02:41 +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)};
|
||||
|
||||
Reference in New Issue
Block a user