OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend changes into the branch. I suppose the gp2x backend and probably all new backends, i.e. gph, dingux etc., might not compile anymore. Since I have no way of testing those it would be nice if porters could look into getting those up to speed in this branch. svn-id: r53399
This commit is contained in:
commit
75e8452b6e
1007 changed files with 127245 additions and 15534 deletions
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined (__PSP__)
|
||||
#if defined (__PSP__)
|
||||
#include <pspthreadman.h>
|
||||
|
||||
#include "common/scummsys.h"
|
||||
|
@ -38,7 +38,7 @@
|
|||
|
||||
bool PspTimer::start() {
|
||||
DEBUG_ENTER_FUNC();
|
||||
|
||||
|
||||
if (!_interval || !_callback)
|
||||
return false;
|
||||
|
||||
|
@ -48,31 +48,31 @@ bool PspTimer::start() {
|
|||
PSP_ERROR("failed to create timer thread. Error code %d\n", _threadId);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
PspTimer *_this = this; // trick to get into context when the thread starts
|
||||
_init = true;
|
||||
|
||||
|
||||
if (sceKernelStartThread(_threadId, sizeof(uint32 *), &_this) < 0) {
|
||||
PSP_ERROR("failed to start thread %d\n", _threadId);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
PSP_DEBUG_PRINT("created timer thread[%x]\n", _threadId);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int PspTimer::thread(SceSize, void *__this) {
|
||||
DEBUG_ENTER_FUNC();
|
||||
PspTimer *_this = *(PspTimer **)__this; // get our this for the context
|
||||
|
||||
|
||||
_this->timerThread();
|
||||
return 0;
|
||||
};
|
||||
|
||||
void PspTimer::timerThread() {
|
||||
DEBUG_ENTER_FUNC();
|
||||
|
||||
|
||||
while (_init) {
|
||||
sceKernelDelayThread(_interval);
|
||||
PSP_DEBUG_PRINT("calling callback!\n");
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
*/
|
||||
|
||||
#ifndef PSP_TIMER_H
|
||||
#define PSP_TIMER_H
|
||||
|
||||
#define PSP_TIMER_H
|
||||
|
||||
class PspTimer {
|
||||
public:
|
||||
typedef void (* CallbackFunc)(void);
|
||||
|
@ -44,4 +44,4 @@ private:
|
|||
bool _init;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // PSP_TIMER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue