Add Start Paramenters API

This commit is contained in:
Kirigaya Kazuto 2017-03-30 11:16:57 +08:00
parent c6bad3df80
commit ccb47aad08
2 changed files with 11 additions and 2 deletions

View File

@ -1412,9 +1412,14 @@ bool canexecute(std::string Path)
/// File Functions will be implied in platform specific source file. /// File Functions will be implied in platform specific source file.
#endif #endif
int _miniengine_argc;
char** _miniengine_argv;
/// Default Setup Code /// Default Setup Code
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
_miniengine_argc=argc;
_miniengine_argv=argv;
MiniEngine::SDLSystem::Init(); MiniEngine::SDLSystem::Init();
int ret = AppMain(); int ret = AppMain();
MiniEngine::SDLSystem::Quit(); MiniEngine::SDLSystem::Quit();

View File

@ -437,3 +437,7 @@ int AppMain();
/// MiniEngine Provides main /// MiniEngine Provides main
int main(int argc,char* argv[]); int main(int argc,char* argv[]);
/// MiniEngine Provided API: Get Start Parameters
int GetArgc();
char** GetArgv();