Fixed SDL2 for Windows.

This commit is contained in:
Martín Lucas Golini
2013-06-22 01:27:07 -03:00
parent 650135bf77
commit 03c481932e
4 changed files with 67 additions and 12 deletions

View File

@@ -89,7 +89,7 @@
#define EE_BACKEND_SDL_ACTIVE
#endif
#if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS || defined( EE_COMPILER_MSVC )
#if EE_PLATFORM == EE_PLATFORM_ANDROID || EE_PLATFORM == EE_PLATFORM_IOS || defined( EE_COMPILER_MSVC )
#if EE_PLATFORM == EE_PLATFORM_ANDROID
#define EE_NO_WIDECHAR
#endif
@@ -119,6 +119,12 @@
#endif
#endif
#else
#if defined( EE_BACKEND_SDL_ACTIVE ) && EE_PLATFORM == EE_PLATFORM_WIN
#define main SDL_main
#define EE_MAIN_FUNC extern "C"
extern "C" int SDL_main(int argc, char *argv[]);
#endif
#ifndef EE_MAIN_FUNC
#define EE_MAIN_FUNC
#endif

View File

@@ -261,13 +261,17 @@ function build_link_configuration( package_name )
links { get_backend_link_name( "sfml-window" ) }
end
else
if ( os.is_real("macosx") ) then
if ( os.is_real("macosx") or os.is_real("windows") ) then
if ( os.is_real("windows") ) then
links { "mingw32" }
end
if ( backend_is("SDL") ) then
links { "SDLmain" }
links { "SDLmain", get_backend_link_name( "SDL" ) }
elseif ( backend_is("SDL2") ) then
links { "SDL2main" }
links { "SDL2main", get_backend_link_name( "SDL2" ) }
elseif ( backend_is("allegro5") ) then
links { "allegro_main" }
links { "allegro_main", get_backend_link_name( "allegro" ) }
elseif ( backend_is("SFML") ) then
links { get_backend_link_name( "sfml-system" ) }
links { get_backend_link_name( "sfml-window" ) }

View File

@@ -1,10 +1,6 @@
../../include/eepp/audio/tsoundmanager.hpp
../../include/eepp/audio/tsoundloader.hpp
../../include/eepp/audio/openal.hpp
../../include/eepp/audio/csoundstream.hpp
../../include/eepp/audio/csoundfileogg.hpp
../../include/eepp/audio/csoundfiledefault.hpp
../../include/eepp/audio/csoundfile.hpp
../../include/eepp/audio/csoundbuffer.hpp
../../include/eepp/audio/csound.hpp
../../include/eepp/audio/cmusic.hpp
@@ -341,7 +337,7 @@
../../include/eepp/math/quad2.hpp
../../include/eepp/math/polygon2.hpp
../../include/eepp/math/line2.hpp
../../include/eepp/math/helper.hpp
../../include/eepp/math/ease.hpp
../../include/eepp/math/easing.hpp
../../include/eepp/math/cwaypoints.hpp
../../include/eepp/math/cperlinnoise.hpp
@@ -459,7 +455,6 @@
../../src/eepp/window/platform/x11/ccursorx11.cpp
../../src/eepp/window/platform/platformimpl.hpp
../../src/eepp/graphics/pixelperfect.cpp
../../src/eepp/graphics/glhelper.cpp
../../src/eepp/graphics/cvertexbuffervbo.cpp
../../src/eepp/graphics/cvertexbufferogl.cpp
../../src/eepp/graphics/cvertexbuffermanager.cpp
@@ -562,7 +557,6 @@
../../src/eepp/graphics/cframebufferfbo.hpp
../../src/eepp/graphics/renderer/rendererhelper.hpp
../../include/eepp/graphics/packerhelper.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl.cpp
../../include/eepp/system/filesystem.hpp
../../src/eepp/system/filesystem.cpp
../../include/eepp/graphics/glhelper.hpp
@@ -570,3 +564,53 @@
../../include/eepp/window/windowcontext.hpp
../../include/eepp/version.hpp
../../src/eepp/base/version.cpp
../../src/eepp/physics/moment.cpp
../../src/eepp/physics/area.cpp
../../premake4.lua
../../src/eepp/audio/csoundfileogg.hpp
../../src/eepp/audio/csoundfiledefault.hpp
../../include/eepp/gaming/cgameobjectobject.hpp
../../src/eepp/gaming/cgameobjectobject.cpp
../../src/eepp/gaming/cgameobjectpolyline.cpp
../../src/eepp/gaming/cgameobjectpolygon.cpp
../../include/eepp/gaming/cgameobjectpolyline.hpp
../../include/eepp/gaming/cgameobjectpolygon.hpp
../../src/eepp/gaming/mapeditor/cobjectproperties.hpp
../../src/eepp/gaming/mapeditor/cobjectproperties.cpp
../../include/eepp/base/noncopyable.hpp
../../include/eepp/system/clock.hpp
../../src/eepp/system/clock.cpp
../../src/eepp/ui/cuidefaulttheme.cpp
../../include/eepp/ui/cuidefaulttheme.hpp
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_pvr_c.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_pvr.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_pkm_c.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_pkm.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_DDS_c.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_DDS.h
../../src/eepp/helper/SOIL2/src/SOIL2/stb_image_write.h
../../src/eepp/helper/SOIL2/src/SOIL2/stb_image.h
../../src/eepp/helper/SOIL2/src/SOIL2/pvr_helper.h
../../src/eepp/helper/SOIL2/src/SOIL2/pkm_helper.h
../../src/eepp/helper/SOIL2/src/SOIL2/image_helper.h
../../src/eepp/helper/SOIL2/src/SOIL2/image_DXT.h
../../src/eepp/helper/SOIL2/src/SOIL2/etc1_utils.h
../../src/eepp/helper/SOIL2/src/SOIL2/SOIL2.h
../../src/eepp/helper/SOIL2/src/SOIL2/stb_image_write.c
../../src/eepp/helper/SOIL2/src/SOIL2/stb_image.c
../../src/eepp/helper/SOIL2/src/SOIL2/image_helper.c
../../src/eepp/helper/SOIL2/src/SOIL2/image_DXT.c
../../src/eepp/helper/SOIL2/src/SOIL2/etc1_utils.c
../../src/eepp/helper/SOIL2/src/SOIL2/SOIL2.c
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_ext_c.h
../../src/eepp/helper/SOIL2/src/SOIL2/stbi_ext.h
../../src/eepp/audio/csoundfile.hpp
../../src/eepp/audio/openal.hpp
../../src/eepp/window/backend/SDL2/cbackendsdl2.cpp
../../src/examples/sound/sound.cpp
../../src/examples/sprites/sprites.cpp
../../src/examples/fonts/fonts.cpp
../../src/examples/vbo_fbo_batch/vbo_fbo_batch.cpp
../../src/examples/physics/physics.cpp
../../src/eepp/physics/cshapepoint.cpp
../../include/eepp/physics/cshapepoint.hpp

View File

@@ -0,0 +1 @@
../../src/