extern dword ctrl_hprm_raw(void) { u32 key = 0; /* if(xrKernelDevkitVersion() >= 0x02000010) return 0;*/ if (!xrHprmIsRemoteExist()) return 0; if (xr_lock(&hprm_l) >= 0) { xrHprmPeekCurrentKey(&key); xr_unlock(&hprm_l); } return (dword) key; }
extern dword ctrl_read_cont(void) { SceCtrlData ctl; xrCtrlReadBufferPositive(&ctl, 1); #ifdef ENABLE_HPRM if (hprmenable && xrHprmIsRemoteExist()) { u32 key; if (xr_lock(&hprm_l) >= 0) { xrHprmPeekCurrentKey(&key); xr_unlock(&hprm_l); if (key > 0) { switch (key) { case PSP_HPRM_FORWARD: if (key == lastkhprmkey) break; lastkhprmkey = key; return CTRL_FORWARD; case PSP_HPRM_BACK: if (key == lastkhprmkey) break; lastkhprmkey = key; return CTRL_BACK; case PSP_HPRM_PLAYPAUSE: if (key == lastkhprmkey) break; lastkhprmkey = key; return CTRL_PLAYPAUSE; } } else lastkhprmkey = 0; } } #endif last_btn = ctl.Buttons; last_tick = ctl.TimeStamp; return last_btn; }
int freq_unlock() { return xr_unlock(&freq_l); }
static inline int cache_unlock(void) { // dbg_printf(d, "%s", __func__); return xr_unlock(&cacher_locker); }
static void music_unlock(void) { xr_unlock(&music_l); }
/** * 解锁 */ int generic_unlock(void) { return xr_unlock(&generic_l); }