aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ps2/systemps2.cpp
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/platform/ps2/systemps2.cpp
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/platform/ps2/systemps2.cpp')
-rw-r--r--backends/platform/ps2/systemps2.cpp14
1 files changed, 13 insertions, 1 deletions
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);