mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01:00

long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
46 lines
1.4 KiB
C
46 lines
1.4 KiB
C
/****************************************************************************
|
|
* Name: src/msw/winestub.cpp
|
|
* Purpose: wxWINE module mapping main() to WinMain()
|
|
* Author: Robert Roebling
|
|
* Created: 04/01/98
|
|
* RCS-ID: $Id: winestub.c 67254 2011-03-20 00:14:35Z DS $
|
|
* Copyright: (c) Robert Roebling
|
|
* Licence: wxWindows licence
|
|
*****************************************************************************/
|
|
|
|
#include <string.h>
|
|
#include "winuser.h"
|
|
#include "xmalloc.h"
|
|
|
|
extern int PASCAL WinMain( HINSTANCE, HINSTANCE, LPSTR, int );
|
|
extern HINSTANCE MAIN_WinelibInit( int *argc, char *argv[] );
|
|
|
|
/* Most Windows C/C++ compilers use something like this to */
|
|
/* access argc and argv globally: */
|
|
int _ARGC;
|
|
char **_ARGV;
|
|
|
|
int main( int argc, char *argv [] )
|
|
{
|
|
HINSTANCE hInstance;
|
|
LPSTR lpszCmdParam;
|
|
int i, len = 0;
|
|
_ARGC = argc;
|
|
_ARGV = (char **)argv;
|
|
|
|
if (!(hInstance = MAIN_WinelibInit( &argc, argv ))) return 0;
|
|
|
|
/* Alloc szCmdParam */
|
|
for (i = 1; i < argc; i++) len += strlen(argv[i]) + 1;
|
|
lpszCmdParam = (LPSTR) xmalloc(len + 1);
|
|
/* Concatenate arguments */
|
|
if (argc > 1) strcpy(lpszCmdParam, argv[1]);
|
|
else lpszCmdParam[0] = '\0';
|
|
for (i = 2; i < argc; i++) strcat(strcat(lpszCmdParam, " "), argv[i]);
|
|
|
|
return WinMain (hInstance, /* hInstance */
|
|
0, /* hPrevInstance */
|
|
lpszCmdParam, /* lpszCmdParam */
|
|
SW_NORMAL); /* nCmdShow */
|
|
}
|