]> icculus.org git repositories - taylor/freespace2.git/blob - src/freespace2/winmain.cpp
clean up app entry a bit
[taylor/freespace2.git] / src / freespace2 / winmain.cpp
1 /*
2  * Copyright (C) Volition, Inc. 1999.  All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on
6  * the source.
7  */
8
9 #include <windows.h>
10 #include <process.h>
11 #include <direct.h>
12 #include <io.h>
13
14
15 extern int game_main(const char *szCmdLine);
16
17
18 int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow)
19 {
20         int result = -1;
21
22         __try
23         {
24                 result = game_main(szCmdLine);
25         }
26         __except(RecordExceptionInfo(GetExceptionInformation(), "Freespace 2 Main Thread"))
27         {
28                 // Do nothing here - RecordExceptionInfo() has already done
29                 // everything that is needed. Actually this code won't even
30                 // get called unless you return EXCEPTION_EXECUTE_HANDLER from
31                 // the __except clause.
32         }
33
34         return result;
35 }