Changeset 546 for code/branches/FICN/src/orxonox/main.cc
- Timestamp:
- Dec 16, 2007, 10:19:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/main.cc
r544 r546 71 71 #endif 72 72 73 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 74 #define WIN32_LEAN_AND_MEAN 75 #include "windows.h" 73 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 74 #define WIN32_LEAN_AND_MEAN 75 #include "windows.h" 76 76 INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT) 77 77 { 78 // something like this would be less hacky 79 // maybe one can work with trailing '\0' 80 // or maybe use string based functions 81 // I was unable to test it without working windows version 82 /*char* cmd = strCmdLine; 83 int argc = 1; 84 for(int i = 0; cmd[i] != NULL; i++) 85 { 86 if(cmd[i] == ' ') argc++; 87 } 88 char* argv[argc]; 89 int j = 0; 90 int k = 0; 91 for(int i = 0; cmd[i] != NULL; i++) 92 { 93 if(cmd[i] != ' ') { 94 argv[j][k]; 95 k++; 96 } 97 else { 98 k = 0; 99 j++; 100 } 101 }*/ 78 102 char *argv[2]; 79 argv[0] = "asdf programName";103 argv[0] = "asdfProgram"; 80 104 argv[1] = strCmdLine; 81 105 int argc = 2; 82 #else 83 int main(int argc, char **argv) 106 #else 107 int main(int argc, char **argv) 84 108 { 85 #endif 109 #endif 86 110 try { 87 111 SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log"); … … 96 120 } 97 121 catch (Ogre::Exception& e) { 98 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 122 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 99 123 MessageBoxA(NULL, e.getFullDescription().c_str(), 100 124 "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
Note: See TracChangeset
for help on using the changeset viewer.