v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
34
source/application/StarMainApplication.hpp
Normal file
34
source/application/StarMainApplication.hpp
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef STAR_MAIN_APPLICATION_HPP
|
||||
#define STAR_MAIN_APPLICATION_HPP
|
||||
|
||||
#include "StarApplication.hpp"
|
||||
#include "StarApplicationController.hpp"
|
||||
#include "StarRenderer.hpp"
|
||||
|
||||
namespace Star {
|
||||
int runMainApplication(ApplicationUPtr application, StringList cmdLineArgs);
|
||||
}
|
||||
|
||||
#if defined STAR_SYSTEM_WINDOWS
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define STAR_MAIN_APPLICATION(ApplicationClass) \
|
||||
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { \
|
||||
int nArgs; \
|
||||
LPWSTR* argsList = CommandLineToArgvW(GetCommandLineW(), &nArgs); \
|
||||
Star::StringList args; \
|
||||
for (int i = 0; i < nArgs; ++i) args.append(Star::String(argsList[i])); \
|
||||
return Star::runMainApplication(Star::make_unique<ApplicationClass>(), args); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define STAR_MAIN_APPLICATION(ApplicationClass) \
|
||||
int main(int argc, char** argv) { \
|
||||
return Star::runMainApplication(Star::make_unique<ApplicationClass>(), Star::StringList(argc, argv)); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue