aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/audiocd/sdl/sdl-audiocd.cpp4
-rw-r--r--backends/audiocd/sdl/sdl-audiocd.h4
-rw-r--r--backends/events/ps3sdl/ps3sdl-events.cpp8
-rw-r--r--backends/events/sdl/sdl-events.cpp2
-rw-r--r--backends/mixer/sdl2/sdl2-mixer.cpp (renamed from backends/mixer/sdl13/sdl13-mixer.cpp)14
-rw-r--r--backends/mixer/sdl2/sdl2-mixer.h (renamed from backends/mixer/sdl13/sdl13-mixer.h)10
-rw-r--r--backends/module.mk6
-rw-r--r--backends/platform/sdl/ps3/ps3.cpp4
-rw-r--r--backends/platform/sdl/sdl.cpp8
-rwxr-xr-xconfigure4
-rw-r--r--dists/ps3/readme-ps3.md4
11 files changed, 32 insertions, 36 deletions
diff --git a/backends/audiocd/sdl/sdl-audiocd.cpp b/backends/audiocd/sdl/sdl-audiocd.cpp
index c7b089af09..ff50c56af3 100644
--- a/backends/audiocd/sdl/sdl-audiocd.cpp
+++ b/backends/audiocd/sdl/sdl-audiocd.cpp
@@ -26,7 +26,7 @@
#include "backends/audiocd/sdl/sdl-audiocd.h"
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
+#if !SDL_VERSION_ATLEAST(2, 0, 0)
#include "common/textconsole.h"
@@ -136,6 +136,6 @@ void SdlAudioCDManager::updateCD() {
}
}
-#endif // !SDL_VERSION_ATLEAST(1, 3, 0)
+#endif // !SDL_VERSION_ATLEAST(2, 0, 0)
#endif
diff --git a/backends/audiocd/sdl/sdl-audiocd.h b/backends/audiocd/sdl/sdl-audiocd.h
index 783d4fe0f0..bfad7b6805 100644
--- a/backends/audiocd/sdl/sdl-audiocd.h
+++ b/backends/audiocd/sdl/sdl-audiocd.h
@@ -27,7 +27,7 @@
#include "backends/platform/sdl/sdl-sys.h"
-#if !SDL_VERSION_ATLEAST(1, 3, 0)
+#if !SDL_VERSION_ATLEAST(2, 0, 0)
/**
* The SDL audio cd manager. Implements real audio cd playback.
@@ -49,6 +49,6 @@ protected:
uint32 _cdEndTime, _cdStopTime;
};
-#endif // !SDL_VERSION_ATLEAST(1, 3, 0)
+#endif // !SDL_VERSION_ATLEAST(2, 0, 0)
#endif
diff --git a/backends/events/ps3sdl/ps3sdl-events.cpp b/backends/events/ps3sdl/ps3sdl-events.cpp
index 0f6e01857b..1fc10559c2 100644
--- a/backends/events/ps3sdl/ps3sdl-events.cpp
+++ b/backends/events/ps3sdl/ps3sdl-events.cpp
@@ -126,8 +126,8 @@ bool PS3SdlEventSource::handleJoyButtonUp(SDL_Event &ev, Common::Event &event) {
* This pauses execution and keeps redrawing the screen until the XMB is closed.
*/
void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
- if (event->type == SDL_ACTIVEEVENT) {
- if (event->active.state == SDL_APPMOUSEFOCUS && !event->active.gain) {
+ if (event->type == SDL_WINDOWEVENT) {
+ if (event->window.event == SDL_WINDOWEVENT_LEAVE) {
// XMB opened
if (g_engine)
g_engine->pauseEngine(true);
@@ -145,9 +145,9 @@ void PS3SdlEventSource::preprocessEvents(SDL_Event *event) {
}
if (event->type == SDL_QUIT)
return;
- if (event->type != SDL_ACTIVEEVENT)
+ if (event->type != SDL_WINDOWEVENT)
continue;
- if (event->active.state == SDL_APPMOUSEFOCUS && event->active.gain) {
+ if (event->window.event == SDL_WINDOWEVENT_ENTER) {
// XMB closed
if (g_engine)
g_engine->pauseEngine(false);
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 038f61664f..745f398be6 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -314,7 +314,7 @@ Common::KeyCode SdlEventSource::SDLToOSystemKeycode(const SDLKey key) {
case SDLK_y: return Common::KEYCODE_y;
case SDLK_z: return Common::KEYCODE_z;
case SDLK_DELETE: return Common::KEYCODE_DELETE;
-#if SDL_VERSION_ATLEAST(1, 3, 0)
+#if SDL_VERSION_ATLEAST(2, 0, 0)
case SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_GRAVE): return Common::KEYCODE_TILDE;
#else
case SDLK_WORLD_16: return Common::KEYCODE_TILDE;
diff --git a/backends/mixer/sdl13/sdl13-mixer.cpp b/backends/mixer/sdl2/sdl2-mixer.cpp
index dc38242bde..96a1361a8c 100644
--- a/backends/mixer/sdl13/sdl13-mixer.cpp
+++ b/backends/mixer/sdl2/sdl2-mixer.cpp
@@ -24,7 +24,7 @@
#if defined(SDL_BACKEND)
-#include "backends/mixer/sdl13/sdl13-mixer.h"
+#include "backends/mixer/sdl2/sdl2-mixer.h"
#include "common/debug.h"
#include "common/system.h"
#include "common/config-manager.h"
@@ -36,14 +36,14 @@
#define SAMPLES_PER_SEC 44100
#endif
-Sdl13MixerManager::Sdl13MixerManager()
+Sdl2MixerManager::Sdl2MixerManager()
:
SdlMixerManager(),
_device(0) {
}
-Sdl13MixerManager::~Sdl13MixerManager() {
+Sdl2MixerManager::~Sdl2MixerManager() {
_mixer->setReady(false);
SDL_CloseAudioDevice(_device);
@@ -51,7 +51,7 @@ Sdl13MixerManager::~Sdl13MixerManager() {
delete _mixer;
}
-void Sdl13MixerManager::init() {
+void Sdl2MixerManager::init() {
// Start SDL Audio subsystem
if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) {
error("Could not initialize SDL: %s", SDL_GetError());
@@ -81,17 +81,17 @@ void Sdl13MixerManager::init() {
}
}
-void Sdl13MixerManager::startAudio() {
+void Sdl2MixerManager::startAudio() {
// Start the sound system
SDL_PauseAudioDevice(_device, 0);
}
-void Sdl13MixerManager::suspendAudio() {
+void Sdl2MixerManager::suspendAudio() {
SDL_CloseAudioDevice(_device);
_audioSuspended = true;
}
-int Sdl13MixerManager::resumeAudio() {
+int Sdl2MixerManager::resumeAudio() {
if (!_audioSuspended)
return -2;
diff --git a/backends/mixer/sdl13/sdl13-mixer.h b/backends/mixer/sdl2/sdl2-mixer.h
index ff2bb43084..ce2616d92b 100644
--- a/backends/mixer/sdl13/sdl13-mixer.h
+++ b/backends/mixer/sdl2/sdl2-mixer.h
@@ -20,8 +20,8 @@
*
*/
-#ifndef BACKENDS_MIXER_SDL13_H
-#define BACKENDS_MIXER_SDL13_H
+#ifndef BACKENDS_MIXER_SDL2_H
+#define BACKENDS_MIXER_SDL2_H
#include "backends/mixer/sdl/sdl-mixer.h"
@@ -31,10 +31,10 @@
* the SDL audio subsystem and the callback for the
* audio mixer implementation.
*/
-class Sdl13MixerManager : public SdlMixerManager {
+class Sdl2MixerManager : public SdlMixerManager {
public:
- Sdl13MixerManager();
- virtual ~Sdl13MixerManager();
+ Sdl2MixerManager();
+ virtual ~Sdl2MixerManager();
/**
* Initialize and setups the mixer
diff --git a/backends/module.mk b/backends/module.mk
index e5e2905781..025d653ddd 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -72,13 +72,11 @@ MODULE_OBJS += \
plugins/sdl/sdl-provider.o \
timer/sdl/sdl-timer.o
-# SDL 1.3 removed audio CD support
-ifndef USE_SDL13
+# SDL 2 removed audio CD support
ifndef USE_SDL2
MODULE_OBJS += \
audiocd/sdl/sdl-audiocd.o
endif
-endif
ifdef USE_OPENGL
MODULE_OBJS += \
@@ -126,7 +124,7 @@ MODULE_OBJS += \
fs/posix/posix-fs-factory.o \
fs/ps3/ps3-fs-factory.o \
events/ps3sdl/ps3sdl-events.o \
- mixer/sdl13/sdl13-mixer.o
+ mixer/sdl2/sdl2-mixer.o
endif
ifeq ($(BACKEND),tizen)
diff --git a/backends/platform/sdl/ps3/ps3.cpp b/backends/platform/sdl/ps3/ps3.cpp
index f111379794..e531d79fba 100644
--- a/backends/platform/sdl/ps3/ps3.cpp
+++ b/backends/platform/sdl/ps3/ps3.cpp
@@ -31,7 +31,7 @@
#include "backends/saves/default/default-saves.h"
#include "backends/fs/ps3/ps3-fs-factory.h"
#include "backends/events/ps3sdl/ps3sdl-events.h"
-#include "backends/mixer/sdl13/sdl13-mixer.h"
+#include "backends/mixer/sdl2/sdl2-mixer.h"
#include <dirent.h>
#include <sys/stat.h>
@@ -70,7 +70,7 @@ void OSystem_PS3::initBackend() {
// Create the mixer manager
if (_mixer == 0) {
- _mixerManager = new Sdl13MixerManager();
+ _mixerManager = new Sdl2MixerManager();
// Setup and start mixer
_mixerManager->init();
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 6d4dede212..fffb9d56d9 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -36,8 +36,8 @@
#include "backends/saves/default/default-saves.h"
-// Audio CD support was removed with SDL 1.3
-#if SDL_VERSION_ATLEAST(1, 3, 0)
+// Audio CD support was removed with SDL 2.0
+#if SDL_VERSION_ATLEAST(2, 0, 0)
#include "backends/audiocd/default/default-audiocd.h"
#else
#include "backends/audiocd/sdl/sdl-audiocd.h"
@@ -246,8 +246,8 @@ void OSystem_SDL::initBackend() {
#endif
if (_audiocdManager == 0) {
- // Audio CD support was removed with SDL 1.3
-#if SDL_VERSION_ATLEAST(1, 3, 0)
+ // Audio CD support was removed with SDL 2.0
+#if SDL_VERSION_ATLEAST(2, 0, 0)
_audiocdManager = new DefaultAudioCDManager();
#else
_audiocdManager = new SdlAudioCDManager();
diff --git a/configure b/configure
index 87070f5663..90aabc0259 100755
--- a/configure
+++ b/configure
@@ -2414,6 +2414,7 @@ case $_host_os in
;;
ps3)
# Force use of SDL and freetype from the ps3 toolchain
+ _sdlconfig=sdl2-config
_sdlpath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
_freetypepath="$PS3DEV/portlibs/ppu:$PS3DEV/portlibs/ppu/bin"
@@ -3108,9 +3109,6 @@ case $_backend in
_sdlversion=`$_sdlconfig --version`
case $_sdlversion in
- 1.3.*)
- add_line_to_config_mk "USE_SDL13 = 1"
- ;;
2.0.*)
add_line_to_config_mk "USE_SDL2 = 1"
;;
diff --git a/dists/ps3/readme-ps3.md b/dists/ps3/readme-ps3.md
index 2fb393b4fb..8290f87066 100644
--- a/dists/ps3/readme-ps3.md
+++ b/dists/ps3/readme-ps3.md
@@ -36,12 +36,12 @@ Unauthorized distribution of an installable package with non freeware games incl
Building from source
====================
-This port of ScummVM to the PS3 is based on SDL. It uses the open source SDK PSL1GHT.
+This port of ScummVM to the PS3 is based on SDL2. It uses the open source SDK PSL1GHT.
The dependencies needed to build it are :
- The toolchain from https://github.com/ps3dev/ps3toolchain
-- SDL from https://github.com/zeldin/SDL_PSL1GHT
+- SDL from https://bitbucket.org/bgK/sdl_psl1ght
- ScummVM from https://github.com/scummvm/scummvm
Once all the dependencies are correctly setup, an installable package can be obtained from source by issuing the following command :