[Base/UI] Android globals initialization + WindowedAppContext parts
This commit is contained in:
@@ -7,4 +7,33 @@
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/base/console_app_posix.cc"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/console_app_main.h"
|
||||
#include "xenia/base/cvar.h"
|
||||
#include "xenia/base/main_android.h"
|
||||
|
||||
extern "C" int main(int argc, char** argv) {
|
||||
xe::ConsoleAppEntryInfo entry_info = xe::GetConsoleAppEntryInfo();
|
||||
|
||||
if (!entry_info.transparent_options) {
|
||||
cvar::ParseLaunchArguments(argc, argv, entry_info.positional_usage,
|
||||
entry_info.positional_options);
|
||||
}
|
||||
|
||||
// Initialize Android globals, including logging. Needs parsed cvars.
|
||||
// TODO(Triang3l): Obtain the actual API level.
|
||||
xe::InitializeAndroidAppFromMainThread(__ANDROID_API__);
|
||||
|
||||
std::vector<std::string> args;
|
||||
for (int n = 0; n < argc; n++) {
|
||||
args.emplace_back(argv[n]);
|
||||
}
|
||||
|
||||
int result = entry_info.entry_point(args);
|
||||
|
||||
xe::ShutdownAndroidAppFromMainThread();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user