# HG changeset patch # User prock@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1286480398 0 # Node ID 52708806f35ce8509e22a080afbe17d4e448762f # Parent 855ad500f9916e51ad5349d472885ded19401237 * Small fix for gcc on Linux. It didn't like passing a const char* to a function that requires a char*. diff -r 855ad500f991 -r 52708806f35c engine/core/video/sdl/renderbackendsdl.cpp --- a/engine/core/video/sdl/renderbackendsdl.cpp Thu Oct 07 18:37:02 2010 +0000 +++ b/engine/core/video/sdl/renderbackendsdl.cpp Thu Oct 07 19:39:58 2010 +0000 @@ -35,6 +35,7 @@ #include "renderbackendsdl.h" #include "sdlimage.h" #include "SDL_image.h" +#include "SDL_getenv.h" namespace FIFE { static Logger _log(LM_VIDEO); @@ -54,9 +55,11 @@ } void RenderBackendSDL::init(const std::string& driver) { + char* buf; if (driver != "") { std::string envVar = std::string("SDL_VIDEODRIVER=") + driver; - SDL_putenv(envVar.c_str()); + buf = const_cast(envVar.c_str()); + putenv(buf); } if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)