New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
integrate game-activity #10794
integrate game-activity #10794
Conversation
Interface Check ReportThis pull request does not change any public interfaces ! |
androidPlatform->setAndroidApp(app); | ||
platform->init(); | ||
platform->loop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for us to use 'run' as the main entry, and run the loop inside. 'app' can also be passed in via argc and argv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry is the same as other platforms, whether it is also considered to be placed in the template layer. What if the developer wants to extend the interface of the platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entry is the same as other platforms, whether it is also considered to be placed in the template layer. What if the developer wants to extend the interface of the platform?
Can not move to template layer. cocos_main will trigger renderer initialize. The old code call cocos_main after ANativeWindow is being set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for us to use 'run' as the main entry, and run the loop inside. 'app' can also be passed in via argc and argv
argc's type is const char **, is it a good way to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was char argv before, but it is const char argv in IOS. So I changed it to const char** uniformly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to change it to template function ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not very good, because the design of this function is to keep the same parameters passed in as main, and it can be used to parse the command line in the platform.
Can also pass in multiple parameters
|
||
void handleAppCommand(int32_t cmd) { | ||
switch (cmd) { | ||
case APP_CMD_SAVE_STATE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these commands issued? I don't seem to see
One more question, does HarmonyOS also support GameActivity?
I remember HarmonyOS was very similar to Android before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APP_CMD_SAVE_STATE is the app lifecycle`s cmd, we just leave this code here.
HarmonyOS doesn't support GameActivity, It's package name doesn't support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it
Please add a documentation describe how to upgrade old project. |
This reverts commit ef7d80f.
No description provided.