aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Lingua2014-01-23 00:34:00 -0500
committerMax Lingua2014-01-23 18:34:26 -0500
commit487e642d00e3282a83e7510d356ff684f0c1aa51 (patch)
tree129a7641fa5585f505e5b719bba67ef7176fe2b1 /backends
parent4ccdb3e2a30ead1fa015437306b046b69b69035b (diff)
downloadscummvm-rg350-487e642d00e3282a83e7510d356ff684f0c1aa51.tar.gz
scummvm-rg350-487e642d00e3282a83e7510d356ff684f0c1aa51.tar.bz2
scummvm-rg350-487e642d00e3282a83e7510d356ff684f0c1aa51.zip
PS2: Support for latest SDK with -D__NEW_PS2SDK__
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp9
-rw-r--r--backends/platform/ps2/Makefile.ps22
-rw-r--r--backends/platform/ps2/systemps2.cpp14
3 files changed, 23 insertions, 2 deletions
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index 4d4143e860..8015eab08f 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -378,7 +378,12 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height) {
createAnimTextures();
// create animation thread
+ #ifdef __NEW_PS2SDK__
+ ee_thread_t animThread;
+ ee_thread_status_t thisThread;
+ #else
ee_thread_t animThread, thisThread;
+ #endif
ReferThreadStatus(GetThreadId(), &thisThread);
_animStack = memalign(64, ANIM_STACK_SIZE);
@@ -395,7 +400,11 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height) {
void Gs2dScreen::quit(void) {
_systemQuit = true;
+ #ifdef __NEW_PS2SDK__
+ ee_thread_status_t statAnim;
+ #else
ee_thread_t statAnim;
+ #endif
do { // wait until thread called ExitThread()
SignalSema(g_AnimSema);
ReferThreadStatus(_animTid, &statAnim);
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index 364f93e52a..2ee47c9a4d 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -98,7 +98,7 @@ FLAGS += -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-unused-paramete
CFLAGS = $(FLAGS) -std=c99
CXXFLAGS = $(FLAGS) -Wnon-virtual-dtor -Wno-reorder -fno-exceptions -fno-rtti
-DEFINES = -D_EE -D__PLAYSTATION2__ -DUSE_ZLIB -DFORCE_RTL -DDATA_PATH=\"host:data\"
+DEFINES = -D_EE -D__PLAYSTATION2__ -D__NEW_PS2SDK__ -DUSE_ZLIB -DFORCE_RTL -DDATA_PATH=\"host:data\"
DEFINES += -DDISABLE_SAVEGAME_SORTING -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU
INCDIR := $(PS2SDK)/ee/include $(PS2SDK)/common/include $(PS2SDK)/ports/include . $(srcdir) $(srcdir)/engines
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index e19aa46abc..80130fc679 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -111,7 +111,11 @@ extern "C" int scummvm_main(int argc, char *argv[]);
extern "C" int main(int argc, char *argv[]) {
SifInitRpc(0);
+ #ifdef __NEW_PS2SDK__
+ ee_thread_status_t thisThread;
+ #else
ee_thread_t thisThread;
+ #endif
int tid = GetThreadId();
ReferThreadStatus(tid, &thisThread);
@@ -452,8 +456,12 @@ void OSystem_PS2::initTimer(void) {
g_TimerThreadSema = CreateSema(&threadSema);
g_SoundThreadSema = CreateSema(&threadSema);
assert((g_TimerThreadSema >= 0) && (g_SoundThreadSema >= 0));
-
+ #ifdef __NEW_PS2SDK__
+ ee_thread_t timerThread, soundThread;
+ ee_thread_status_t thisThread;
+ #else
ee_thread_t timerThread, soundThread, thisThread;
+ #endif
ReferThreadStatus(GetThreadId(), &thisThread);
_timerStack = (uint8 *)memalign(64, TIMER_STACK_SIZE);
@@ -885,7 +893,11 @@ void OSystem_PS2::quit(void) {
//setTimerCallback(NULL, 0);
_screen->wantAnim(false);
_systemQuit = true;
+ #ifdef __NEW_PS2SDK__
+ ee_thread_status_t statSound, statTimer;
+ #else
ee_thread_t statSound, statTimer;
+ #endif
printf("Waiting for timer and sound thread to end\n");
do { // wait until both threads called ExitThread()
ReferThreadStatus(_timerTid, &statTimer);