[Scummvm-cvs-logs] SF.net SVN: scummvm:[49903] scummvm/trunk

Bluddy at users.sourceforge.net Bluddy at users.sourceforge.net
Wed Jun 16 11:04:27 CEST 2010


Revision: 49903
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49903&view=rev
Author:   Bluddy
Date:     2010-06-16 09:04:27 +0000 (Wed, 16 Jun 2010)

Log Message:
-----------
PSP: got rid of SDL

Modified Paths:
--------------
    scummvm/trunk/backends/platform/psp/Makefile
    scummvm/trunk/backends/platform/psp/README.PSP
    scummvm/trunk/backends/platform/psp/README.PSP.in
    scummvm/trunk/backends/platform/psp/osys_psp.cpp
    scummvm/trunk/backends/platform/psp/osys_psp.h
    scummvm/trunk/configure

Modified: scummvm/trunk/backends/platform/psp/Makefile
===================================================================
--- scummvm/trunk/backends/platform/psp/Makefile	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/backends/platform/psp/Makefile	2010-06-16 09:04:27 UTC (rev 49903)
@@ -124,17 +124,13 @@
 LDFLAGS += -pg
 endif
 
-# SDL Libs and Flags
-SDLFLAGS := $(shell $(PSPBIN)/sdl-config --cflags)
-SDLLIBS  := $(shell $(PSPBIN)/sdl-config --libs)
 # PSP LIBS
 PSPLIBS =  -lpspprof -lpspvfpu -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspsdk \
 	-lpsputility -lpspuser -lpsppower -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lpspaudiocodec \
 	-lpspkernel
 
 # Add in PSPSDK includes and libraries.
-CXXFLAGS += $(SDLFLAGS)
-LIBS     += -lpng -lSDL -lz $(findstring -lGL,$(SDLLIBS)) -lstdc++ -lc -lm $(filter -L%,$(SDLLIBS)) $(PSPLIBS)
+LIBS     += -lpng -lz -lstdc++ -lc -lm $(PSPLIBS)
 
 OBJS := powerman.o \
 	psp_main.o \

Modified: scummvm/trunk/backends/platform/psp/README.PSP
===================================================================
--- scummvm/trunk/backends/platform/psp/README.PSP	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/backends/platform/psp/README.PSP	2010-06-16 09:04:27 UTC (rev 49903)
@@ -99,8 +99,6 @@
 		Note: This usually gets installed by the PSP toolchain,
 		so you don't have to do it manually.
 
-- SDL		(svn co svn://svn.pspdev.org/psp/trunk/SDL)
-
 - zlib		(svn co svn://svn.pspdev.org/psp/trunk/zlib)
 
 - libPNG	(svn co svn://svn.pspdev.org/psp/trunk/libpng)

Modified: scummvm/trunk/backends/platform/psp/README.PSP.in
===================================================================
--- scummvm/trunk/backends/platform/psp/README.PSP.in	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/backends/platform/psp/README.PSP.in	2010-06-16 09:04:27 UTC (rev 49903)
@@ -99,8 +99,6 @@
 		Note: This usually gets installed by the PSP toolchain,
 		so you don't have to do it manually.
 
-- SDL		(svn co svn://svn.pspdev.org/psp/trunk/SDL)
-
 - zlib		(svn co svn://svn.pspdev.org/psp/trunk/zlib)
 
 - libPNG	(svn co svn://svn.pspdev.org/psp/trunk/libpng)

Modified: scummvm/trunk/backends/platform/psp/osys_psp.cpp
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/backends/platform/psp/osys_psp.cpp	2010-06-16 09:04:27 UTC (rev 49903)
@@ -48,8 +48,6 @@
 
 #include "backends/platform/psp/trace.h"
 
-#define USE_PSP_AUDIO
-
 #define	SAMPLES_PER_SEC	44100
 
 static int timer_handler(int t) {
@@ -58,14 +56,6 @@
 	return t;
 }
 
-void OSystem_PSP::initSDL() {
-#ifdef USE_PSP_AUDIO
-	SDL_Init(0);
-#else
-	SDL_Init(SDL_INIT_AUDIO);
-#endif
-}
-
 OSystem_PSP::~OSystem_PSP() {}
 
 #define PSP_SCREEN_WIDTH 480
@@ -89,8 +79,6 @@
 	_inputHandler.setKeyboard(&_keyboard);
 	_inputHandler.init();
 
-	initSDL();
-	
 	_savefile = new PSPSaveFileManager;
 
 	_timer = new DefaultTimerManager();
@@ -388,7 +376,6 @@
 
 	assert(!_mixer);
 
-#ifdef USE_PSP_AUDIO
 	if (!_audio.open(samplesPerSec, 2, samples, mixCallback, this)) {
 		PSP_ERROR("failed to open audio\n");
 		return;
@@ -398,46 +385,10 @@
 	assert(_mixer);
 	_mixer->setReady(true);
 	_audio.unpause();
-#else
-	SDL_AudioSpec obtained;
-	SDL_AudioSpec desired;
-
-	memset(&desired, 0, sizeof(desired));
-	desired.freq = samplesPerSec;
-	desired.format = AUDIO_S16SYS;
-	desired.channels = 2;
-	desired.samples = samples;
-	desired.callback = mixCallback;
-	desired.userdata = this;
-	
-	if (SDL_OpenAudio(&desired, &obtained) != 0) {
-		warning("Could not open audio: %s", SDL_GetError());
-		_mixer = new Audio::MixerImpl(this, samplesPerSec);
-		assert(_mixer);
-		_mixer->setReady(false);
-	} else {
-		// Note: This should be the obtained output rate, but it seems that at
-		// least on some platforms SDL will lie and claim it did get the rate
-		// even if it didn't. Probably only happens for "weird" rates, though.
-		samplesPerSec = obtained.freq;
-
-		// Create the mixer instance and start the sound processing
-		_mixer = new Audio::MixerImpl(this, samplesPerSec);
-		assert(_mixer);
-		_mixer->setReady(true);
-
-		SDL_PauseAudio(0);
-	}
-#endif /* USE_PSP_AUDIO */
 }
 
 void OSystem_PSP::quit() {
-#ifdef USE_PSP_AUDIO
 	_audio.close();
-#else
-	SDL_CloseAudio();
-#endif
-	SDL_Quit();
 	sceKernelExitGame();
 }
 

Modified: scummvm/trunk/backends/platform/psp/osys_psp.h
===================================================================
--- scummvm/trunk/backends/platform/psp/osys_psp.h	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/backends/platform/psp/osys_psp.h	2010-06-16 09:04:27 UTC (rev 49903)
@@ -42,8 +42,6 @@
 #include "backends/timer/psp/timer.h"
 #include "backends/platform/psp/thread.h"
 
-#include <SDL.h>
-
 class OSystem_PSP : public BaseBackend {
 private:
 
@@ -64,8 +62,6 @@
 	PspTimer _pspTimer;
 	PspRtc _pspRtc;
 
-	void initSDL();	
-
 public:
 	OSystem_PSP() : _savefile(0), _mixer(0), _timer(0), _pendingUpdate(false), _pendingUpdateCounter(0) {}
 	~OSystem_PSP();

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2010-06-16 07:22:54 UTC (rev 49902)
+++ scummvm/trunk/configure	2010-06-16 09:04:27 UTC (rev 49903)
@@ -2484,14 +2484,7 @@
 		;;
 	psp)
 		DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL"
-		INCLUDES="$INCLUDES -I$PSPDEV/psp/include/SDL"
-		LIBS="$LIBS -lpng -lSDL -Wl,-Map,mapfile.txt"
-		SDLLIBS=`$PSPDEV/psp/bin/sdl-config --libs`
-
-		if `echo "$SDLLIBS" | grep ".*-lGL.*" 1>/dev/null 2>&1`
-		then
-			LIBS="$LIBS -lGL"
-		fi
+		LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt"
 		;;
 	samsungtv)
 		find_sdlconfig


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list