mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 10:10:52 +00:00
Changed: Used qtmain instead of WinMain under Windows
This commit is contained in:
parent
e05d47afae
commit
a2d2403450
1 changed files with 3 additions and 15 deletions
|
@ -61,7 +61,7 @@ void usage()
|
|||
exit(1);
|
||||
}
|
||||
|
||||
QMap<QString, QSize> parseCustomSizeHints(int argc, const char **argv)
|
||||
QMap<QString, QSize> parseCustomSizeHints(int argc, char **argv)
|
||||
{
|
||||
/* from Qt sample */
|
||||
|
||||
|
@ -100,10 +100,9 @@ QMap<QString, QSize> parseCustomSizeHints(int argc, const char **argv)
|
|||
# else
|
||||
# define tstring string
|
||||
# endif
|
||||
sint WINAPI WinMain(HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, LPSTR lpCmdLine, int /* nCmdShow */)
|
||||
#else
|
||||
sint main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
sint main(int argc, char **argv)
|
||||
{
|
||||
#if defined(NL_OS_WINDOWS) && !FINAL_VERSION
|
||||
// ensure paths are ok before powering up nel
|
||||
|
@ -173,17 +172,6 @@ sint main(int argc, char **argv)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
std::vector<std::string> argvstd;
|
||||
NLMISC::explode<std::string>(std::string(lpCmdLine), " ", argvstd, true);
|
||||
std::vector<const char *> argvp(argvstd.size() + 1);
|
||||
for (std::vector<std::string>::size_type i = 0; i < argvstd.size(); ++i)
|
||||
argvp[i] = argvstd[i].c_str();
|
||||
argvp[argvstd.size()] = NULL;
|
||||
int argc = argvstd.size();
|
||||
const char **argv = &argvp[0];
|
||||
#endif
|
||||
|
||||
#ifdef NL_OS_WINDOWS
|
||||
HRESULT hr;
|
||||
hr = hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
|
||||
|
|
Loading…
Reference in a new issue