PJS: completed new conifg

git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/personal/carm/dev-1.0@357 6778bc44-b910-0410-a7a0-be141de4315d
This commit is contained in:
psperl
2007-08-29 23:39:35 +00:00
parent 943985f846
commit 768baf61ff
2 changed files with 10 additions and 6 deletions

View File

@ -1,5 +1,5 @@
PROJECT(xmms_projectM)
ADD_LIBRARY(xmms_projectM SHARED main.cpp sdltoprojectM.h video_init.cpp)
ADD_LIBRARY(xmms_projectM SHARED main.cpp sdltoprojectM.h video_init.cpp ConfigFile.h ConfigFile.cpp)
INCLUDE(FindPkgConfig.cmake)

View File

@ -1,5 +1,5 @@
/*
projectM v0.95 - xmms-projectm.sourceforge.net
projectM v1.01 - xmms-projectm.sourceforge.net
--------------------------------------------------
Lead Developers: Carmelo Piccione (cep@andrew.cmu.edu) &
@ -40,6 +40,7 @@ www.gamedev.net/reference/programming/features/beatdetection/
#include <GL/glu.h>
#include <xmms/xmmsctrl.h>
#include <math.h>
#include "ConfigFile.h"
#include <libprojectM/BeatDetect.hpp>
#include <libprojectM/PCM.hpp>
@ -104,8 +105,7 @@ SDL_mutex *mutex;
SDL_Event event;
SDL_Surface *screen;
//SDL_RenderTarget *RenderTarget = NULL;
//GLuint RenderTargetTextureID;
projectM * globalPM = NULL;
@ -168,9 +168,13 @@ int worker_func(void*)
std::string config_file;
config_file = read_config();
int wvw = 512;
int wvh = 512;
ConfigFile config(config_file);
int wvw = config.read<int>( "Window Width", 512 );
int wvh = config.read<int>( "Window Height", 512 );
int fullscreen = 0;
if (config.read("Fullscreen", true)) fullscreen = 1;
else fullscreen = 0;
init_display(wvw,wvh,&fvw,&fvh,fullscreen);
SDL_WM_SetCaption("projectM v1.00", "projectM v1.00");