|
|
1.1 ! root 1: /* ! 2: * Hatari - Fix for compliation using Visual Studio 6 ! 3: * ! 4: * This file is distributed under the GNU Public License, version 2 or at ! 5: * your option any later version. Read the file gpl.txt for details. ! 6: */ ! 7: ! 8: #if defined(_VCWIN_) ! 9: #pragma comment(lib, "..\\SDL\\lib\\sdl.lib") // sdl.lib ! 10: #pragma comment(lib, "..\\zlib\\win32\\zlib1.lib") // zlib1.lib ! 11: #endif ! 12: ! 13: #if defined(_VCWIN_) ! 14: #include <tchar.h> ! 15: #include <stdio.h> ! 16: #include <stdarg.h> ! 17: #endif ! 18: ! 19: #include "log.h" ! 20: ! 21: extern FILE *TraceFile; ! 22: ! 23: #if defined(_VCWIN_) ! 24: #ifndef _INC_HATARI_TRACE ! 25: #define _INC_HATARI_TRACE ! 26: ! 27: #if ENABLE_TRACING ! 28: void LOG_TRACE(int level, const char* format, ...) ! 29: { ! 30: va_list x; ! 31: va_start(x,format); ! 32: if ( HatariTraceFlags & level ) _vftprintf(TraceFile,format, x); ! 33: va_end (x); ! 34: }; ! 35: #else /* ENABLE_TRACING */ ! 36: void LOG_TRACE(int level, ...) ! 37: { ! 38: } ! 39: ! 40: #endif /* ENABLE_TRACING */ ! 41: ! 42: void LOG_TRACE_PRINT(char* strFirstString, ...) ! 43: { ! 44: va_list x; ! 45: va_start(x,strFirstString); ! 46: _vftprintf(TraceFile,strFirstString, x); ! 47: va_end (x); ! 48: }; ! 49: ! 50: #endif ! 51: ! 52: #endif ! 53: ! 54: ! 55: #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers ! 56: ! 57: // Windows Header Files: ! 58: #include <windows.h> ! 59: ! 60: #ifdef __cplusplus ! 61: extern "C" ! 62: { ! 63: #endif ! 64: ! 65: extern int SDL_main(int argc, char *argv[]); ! 66: ! 67: int main(int argc, char *argv[]) ! 68: { ! 69: return SDL_main(argc,argv); ! 70: } ! 71: ! 72: int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, ! 73: LPSTR lpCmdLine, int nCmdShow) ! 74: { ! 75: return SDL_main(1,&lpCmdLine); ! 76: } ! 77: ! 78: #ifdef __cplusplus ! 79: } ! 80: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.