Changeset 2276 for trunk/src/core.h


Ignore:
Timestamp:
Jan 25, 2013, 2:38:46 PM (8 years ago)
Author:
sam
Message:

build: revert the weak symbol work; it confuses Visual Studio too much.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core.h

    r2274 r2276  
    6969#endif
    7070
    71 /* If using SDL, let it override main() but immediately replace
    72  * the override with ours, then declare weak symbols to ensure one
    73  * of our dummy functions gets replaced by the user's main(). */
    74 #if defined USE_SDL
     71/* If using SDL on Windows or OS X, let it override main() */
     72#if defined USE_SDL && (defined _WIN32 || defined __APPLE__)
    7573#   include <SDL_main.h>
    76 #   if defined main && !LOL_DONT_DIVERT_MAIN
    77 #       undef main
    78 #       define main lol_sdl_main
    79 #       if defined _MSC_VER
    80 int lol_sdl_main();
    81 int lol_sdl_main_msvc();
    82 #pragma comment(linker, "/alternatename:?lol_sdl_main@@YAHXZ" \
    83                                       "=?lol_sdl_main_msvc@@YAHXZ")
    84 int lol_sdl_main(int argc, char **argv);
    85 int lol_sdl_main_msvc(int argc, char **argv);
    86 #pragma comment(linker, "/alternatename:?lol_sdl_main@@YAHHPEAPEAD@Z" \
    87                                       "=?lol_sdl_main_msvc@@YAHHPEAPEAD@Z")
    88 int lol_sdl_main(int argc, char **argv, char **envp);
    89 int lol_sdl_main_msvc(int argc, char **argv, char **envp);
    90 #pragma comment(linker, "/alternatename:?lol_sdl_main@@YAHHPEAPEAD0@Z" \
    91                                       "=?lol_sdl_main_msvc@@YAHHPEAPEAD0@Z")
    92 #       endif
    93 #   endif
    9474#endif
    9575
Note: See TracChangeset for help on using the changeset viewer.