From e7e8808affc1a256b228da859e44ec3071c3a5a4 Mon Sep 17 00:00:00 2001 From: Yotam Barnoy Date: Wed, 16 Jun 2010 09:04:27 +0000 Subject: PSP: got rid of SDL svn-id: r49903 --- backends/platform/psp/Makefile | 6 +---- backends/platform/psp/README.PSP | 2 -- backends/platform/psp/README.PSP.in | 2 -- backends/platform/psp/osys_psp.cpp | 49 ------------------------------------- backends/platform/psp/osys_psp.h | 4 --- 5 files changed, 1 insertion(+), 62 deletions(-) (limited to 'backends/platform/psp') diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile index 7f8bb63b0a..02fd8b022a 100644 --- a/backends/platform/psp/Makefile +++ b/backends/platform/psp/Makefile @@ -124,17 +124,13 @@ CXXFLAGS += -pg -g 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 \ diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP index 45f31483f7..f4d5bae6d6 100644 --- a/backends/platform/psp/README.PSP +++ b/backends/platform/psp/README.PSP @@ -99,8 +99,6 @@ To build ScummVM for PSP you need: 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) diff --git a/backends/platform/psp/README.PSP.in b/backends/platform/psp/README.PSP.in index d9f75974f1..2d53fd3b47 100644 --- a/backends/platform/psp/README.PSP.in +++ b/backends/platform/psp/README.PSP.in @@ -99,8 +99,6 @@ To build ScummVM for PSP you need: 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) diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp index 580e4f1cfd..01053b8cbb 100644 --- a/backends/platform/psp/osys_psp.cpp +++ b/backends/platform/psp/osys_psp.cpp @@ -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 @@ static int timer_handler(int t) { 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 @@ void OSystem_PSP::initBackend() { _inputHandler.setKeyboard(&_keyboard); _inputHandler.init(); - initSDL(); - _savefile = new PSPSaveFileManager; _timer = new DefaultTimerManager(); @@ -388,7 +376,6 @@ void OSystem_PSP::setupMixer(void) { 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 @@ void OSystem_PSP::setupMixer(void) { 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(); } diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h index 56a64ccb80..46f258f577 100644 --- a/backends/platform/psp/osys_psp.h +++ b/backends/platform/psp/osys_psp.h @@ -42,8 +42,6 @@ #include "backends/timer/psp/timer.h" #include "backends/platform/psp/thread.h" -#include - class OSystem_PSP : public BaseBackend { private: @@ -64,8 +62,6 @@ private: PspTimer _pspTimer; PspRtc _pspRtc; - void initSDL(); - public: OSystem_PSP() : _savefile(0), _mixer(0), _timer(0), _pendingUpdate(false), _pendingUpdateCounter(0) {} ~OSystem_PSP(); -- cgit v1.2.3