From 639e4c9f23ea4ff061743757a28e2acf40c27d6a Mon Sep 17 00:00:00 2001 From: josh Date: Tue, 26 Oct 2010 20:13:34 +0000 Subject: [PATCH] initialize and clean up ODE properly git-svn-id: svn://anubis/dwscr/trunk@123 5bef9df8-b654-44bb-925b-0ff18baa8f8c --- dwscr.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dwscr.cc b/dwscr.cc index f0f87d0..74bffac 100644 --- a/dwscr.cc +++ b/dwscr.cc @@ -12,6 +12,7 @@ #include #include #include +#include #include "displayinfo.h" #include "ss/SSMain.h" using namespace std; @@ -67,11 +68,11 @@ int main(int argc, char * argv[]) /* make the SDL window appear in the top-left corner of the screen */ if (!windowed) - putenv("SDL_VIDEO_WINDOW_POS=0,0"); + putenv((char *) "SDL_VIDEO_WINDOW_POS=0,0"); /* do not disable power management (this will allow monitors * to power off at the normally configured timeout) */ - putenv("SDL_VIDEO_ALLOW_SCREENSAVER=1"); + putenv((char *) "SDL_VIDEO_ALLOW_SCREENSAVER=1"); if (!start) return 0; @@ -109,12 +110,15 @@ int main(int argc, char * argv[]) SDL_ShowCursor(SDL_DISABLE); } + dInitODE(); + /* after our window is created and SDL and OpenGL are initialized, * start the main screensaver functionality */ int num_monitors = windowed ? 1 : getNumMonitors(); SSMain ss(width, height, num_monitors, sdlSurface); ss.run(); + dCloseODE(); SDL_Quit(); return 0; }