2 // This file is part of the PicoDrive Megadrive Emulator
\r
4 // This code is licensed under the GNU General Public License version 2.0 and the MAME License.
\r
5 // You can choose the license that has the most advantages for you.
\r
7 // SVN repository can be found at http://code.google.com/p/cyclone68000/
\r
12 static FILE *DebugFile=NULL;
\r
14 int WINAPI WinMain(HINSTANCE,HINSTANCE,LPTSTR,int)
\r
19 memset(&msg,0,sizeof(msg));
\r
20 memset(device,0,sizeof(device));
\r
22 // Check if this program is running already:
\r
23 FrameWnd=FindWindow(APP_TITLE,NULL);
\r
24 if (FrameWnd!=NULL) { SetForegroundWindow(FrameWnd); return 0; }
\r
26 DeleteFile(L"zout.txt");
\r
28 SystemParametersInfo(SPI_GETOEMINFO,sizeof(device)>>1,device,0);
\r
29 if (_wcsicmp(device,L"compaq ipaq h3800")==0) Main3800=1;
\r
36 WaveRate=44100; WaveLen=735;
\r
41 ret=PeekMessage(&msg,NULL,0,0,PM_REMOVE);
\r
44 if (msg.message==WM_QUIT) break;
\r
45 TranslateMessage(&msg);
\r
46 DispatchMessage(&msg);
\r
61 DestroyWindow(FrameWnd);
\r
63 if (DebugFile) fclose(DebugFile);
\r
68 extern "C" int dprintf(char *Format, ...)
\r
70 va_list VaList=NULL;
\r
71 va_start(VaList,Format);
\r
73 if (DebugFile==NULL) DebugFile=fopen("zout.txt","wt");
\r
74 if (DebugFile) vfprintf(DebugFile,Format,VaList);
\r