mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
(VITA) libco: Fix small bug
This commit is contained in:
parent
5ff25ca6ae
commit
5be5ce8416
@ -37,7 +37,7 @@ void co_thunk(uint32_t argOnInitialize, uint32_t argOnRun)
|
||||
cothread_t co_active(void)
|
||||
{
|
||||
if(!co_active_)
|
||||
{
|
||||
{
|
||||
sceSysmoduleLoadModule(SCE_SYSMODULE_FIBER);
|
||||
co_active_ = (cothread_t)1;
|
||||
}
|
||||
@ -53,7 +53,7 @@ cothread_t co_create(unsigned int heapsize, void (*coentry)(void))
|
||||
sceSysmoduleLoadModule(SCE_SYSMODULE_FIBER);
|
||||
co_active_ = (cothread_t)1;
|
||||
}
|
||||
|
||||
|
||||
//_sceFiberInitializeImpl
|
||||
int ret = _sceFiberInitializeImpl(tailFiber, "tailFiber", co_thunk, (uint32_t)coentry, (void*) m_contextBuffer, 10000, NULL);
|
||||
if(ret==0){
|
||||
@ -71,7 +71,7 @@ void co_delete(cothread_t cothread)
|
||||
|
||||
void co_switch(cothread_t cothread)
|
||||
{
|
||||
|
||||
|
||||
uint32_t argOnReturn = 0;
|
||||
if(cothread == (cothread_t)1){
|
||||
co_active_ = cothread;
|
||||
@ -79,11 +79,12 @@ void co_switch(cothread_t cothread)
|
||||
}else{
|
||||
SceFiber* theFiber = (SceFiber*)cothread;
|
||||
if(co_active_ == (cothread_t)1){
|
||||
co_active_ = cothread;
|
||||
sceFiberRun(theFiber, 0, &argOnReturn);
|
||||
}else{
|
||||
co_active_ = cothread;
|
||||
sceFiberSwitch(theFiber, 0, &argOnReturn);
|
||||
}
|
||||
co_active_ = cothread;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user