diff --git a/libretro-common/libco/scefiber.c b/libretro-common/libco/scefiber.c index bd95947417..af06ba35e8 100644 --- a/libretro-common/libco/scefiber.c +++ b/libretro-common/libco/scefiber.c @@ -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; } }