From a2d24034507d666fda3592bb36e30d2c1eb7d229 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 7 Sep 2010 17:40:33 +0200 Subject: [PATCH] Changed: Used qtmain instead of WinMain under Windows --- code/nel/samples/3d/nel_qt/nel_qt.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/code/nel/samples/3d/nel_qt/nel_qt.cpp b/code/nel/samples/3d/nel_qt/nel_qt.cpp index 133d11f44..d7ce2a33f 100644 --- a/code/nel/samples/3d/nel_qt/nel_qt.cpp +++ b/code/nel/samples/3d/nel_qt/nel_qt.cpp @@ -61,7 +61,7 @@ void usage() exit(1); } -QMap parseCustomSizeHints(int argc, const char **argv) +QMap parseCustomSizeHints(int argc, char **argv) { /* from Qt sample */ @@ -100,10 +100,9 @@ QMap 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 argvstd; - NLMISC::explode(std::string(lpCmdLine), " ", argvstd, true); - std::vector argvp(argvstd.size() + 1); - for (std::vector::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);