From ccb47aad08eed2b9532b9b6a414eb237f542cb05 Mon Sep 17 00:00:00 2001 From: Kiritow <1362050620@qq.com> Date: Thu, 30 Mar 2017 11:16:57 +0800 Subject: [PATCH] Add Start Paramenters API --- MiniEngine.cpp | 9 +++++++-- MiniEngine.h | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/MiniEngine.cpp b/MiniEngine.cpp index 61ab576..07cca44 100644 --- a/MiniEngine.cpp +++ b/MiniEngine.cpp @@ -1216,8 +1216,8 @@ namespace MiniEngine return 40; case SDL_DROPCOMPLETE: return 41; - #endif - + #endif + case SDL_AUDIODEVICEADDED: return 42; case SDL_AUDIODEVICEREMOVED: @@ -1412,9 +1412,14 @@ bool canexecute(std::string Path) /// File Functions will be implied in platform specific source file. #endif +int _miniengine_argc; +char** _miniengine_argv; + /// Default Setup Code int main(int argc, char* argv[]) { + _miniengine_argc=argc; + _miniengine_argv=argv; MiniEngine::SDLSystem::Init(); int ret = AppMain(); MiniEngine::SDLSystem::Quit(); diff --git a/MiniEngine.h b/MiniEngine.h index fec9a0c..4894783 100644 --- a/MiniEngine.h +++ b/MiniEngine.h @@ -437,3 +437,7 @@ int AppMain(); /// MiniEngine Provides main int main(int argc,char* argv[]); + +/// MiniEngine Provided API: Get Start Parameters +int GetArgc(); +char** GetArgv();