aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorYotam Barnoy2010-06-16 09:04:27 +0000
committerYotam Barnoy2010-06-16 09:04:27 +0000
commite7e8808affc1a256b228da859e44ec3071c3a5a4 (patch)
tree3637b2a8be1770b08536b06ba3cb912d0ec0d07d /backends
parent4ac81f3d18c6d31d1e6291e53d128db9f7199f57 (diff)
downloadscummvm-rg350-e7e8808affc1a256b228da859e44ec3071c3a5a4.tar.gz
scummvm-rg350-e7e8808affc1a256b228da859e44ec3071c3a5a4.tar.bz2
scummvm-rg350-e7e8808affc1a256b228da859e44ec3071c3a5a4.zip
PSP: got rid of SDL
svn-id: r49903
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/psp/Makefile6
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/README.PSP.in2
-rw-r--r--backends/platform/psp/osys_psp.cpp49
-rw-r--r--backends/platform/psp/osys_psp.h4
5 files changed, 1 insertions, 62 deletions
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 <SDL.h>
-
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();