当前位置: 首页>>代码示例>>C++>>正文


C++ sceKernelCreateCallback函数代码示例

本文整理汇总了C++中sceKernelCreateCallback函数的典型用法代码示例。如果您正苦于以下问题:C++ sceKernelCreateCallback函数的具体用法?C++ sceKernelCreateCallback怎么用?C++ sceKernelCreateCallback使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sceKernelCreateCallback函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[]) {
	SceUID mod;
	char s[255];
	int r;
	int SDCB1, SDCB2;

	sceKernelDelayThread(7000000);

	mod = pspSdkLoadStartModule("ms0:/seplugins/deemerd.prx", PSP_MEMORY_PARTITION_KERNEL);
	if (mod < 0) {
		sprintf(s, "Error 0x%08X loading/starting deemerd.prx.\n", mod);
		debugIssueError(s);
	}

	SDCB1 = sceKernelCreateCallback("SaveDataStartCallback", hcDeemerCapturedSDParamsCallback, NULL );
	SDCB2 = sceKernelCreateCallback("SaveDataGetStatusCallback", hcDeemerSavedataGetStatusCallback, NULL );

	hcDeemerDriverSetupCallbackCapturedSDParams(SDCB1, SDCB2);

	r = hcDeemerDriverPatchSavedataInitStart();

	sceKernelSleepThreadCB();

	return 0;
}
开发者ID:DenielX,项目名称:psptools,代码行数:25,代码来源:main.c

示例2: CallbackThread

// Callback thread
int CallbackThread(SceSize args, void *argp) {
	int cbid;
	cbid = sceKernelCreateCallback("Exit Callback", (void *) exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);
	cbid = sceKernelCreateCallback("Power Callback", (void *) power_callback, NULL); 
	scePowerRegisterCallback(0, cbid); 
	sceKernelSleepThreadCB();
	return 0;
}
开发者ID:bensaraceno,项目名称:PSP,代码行数:10,代码来源:main.c

示例3: CallbackThread

// Thread to create the callbacks and then begin polling
int CallbackThread (int args, void *argp)
{
	int cbid;

	cbid = sceKernelCreateCallback ("Exit Callback", (SceKernelCallbackFunction)ExitCallback, NULL);
	sceKernelRegisterExitCallback  (cbid);
	cbid = sceKernelCreateCallback ("Power Callback", (SceKernelCallbackFunction)PowerCallback, NULL);
	scePowerRegisterCallback       (0, cbid);

	sceKernelSleepThreadCB ();
}
开发者ID:joshdekock,项目名称:jim-pspware,代码行数:12,代码来源:psp2.cpp

示例4: psp_callback_thread

int 
psp_callback_thread(SceSize args, void *argp)
{
  int cid;

  cid = sceKernelCreateCallback("Exit Call Back", psp_exit_callback, NULL);
  sceKernelRegisterExitCallback(cid);
  cid = sceKernelCreateCallback("Power Call Back", psp_power_callback, NULL);
  //scePowerRegisterCallback(0,cid);

	sceKernelSleepThreadCB();
  
  return 0;
}
开发者ID:joel16,项目名称:Custom-Firmware-Extender,代码行数:14,代码来源:psp_init.c

示例5: PowerCallback

void PowerCallback (int unknown, int pwrflags)
{
	if (pwrflags & PSP_POWER_CB_HOLD_SWITCH)
	{
		extern bool8 g_bShowProfilerIno;
		g_bShowProfilerInfo = (! g_bShowProfilerInfo);
	}
	
	if (pwrflags & PSP_POWER_CB_POWER_SWITCH){
		if (g_bROMLoaded) {
			scePowerSetClockFrequency (222, 222, 111);
			S9xSetSoundMute           (TRUE);
			g_bSleep = true;
			save_config     ();
			Memory.SaveSRAM (S9xGetFilename ("srm"));
		}
	} else if (pwrflags & PSP_POWER_CB_RESUME_COMPLETE) {
		g_bSleep = false;
	}

	if (pwrflags & PSP_POWER_CB_BATTERY_LOW){
		scePowerSetClockFrequency (222,222,111);
		S9xSetInfoString          ("WARNING: PSP Battery is Low! (Automatically Throttling CPU)");
	}

	int cbid;
	cbid = sceKernelCreateCallback ("Power Callback", (SceKernelCallbackFunction)PowerCallback, NULL);
	scePowerRegisterCallback       (0, cbid);
}
开发者ID:joshdekock,项目名称:jim-pspware,代码行数:29,代码来源:psp2.cpp

示例6: callback_thread

/* Callback thread */
static int callback_thread(SceSize args, void *argp)
{
	int cbid;

	lprintf("callback_thread started with id %08x, priority %i\n",
		sceKernelGetThreadId(), sceKernelGetThreadCurrentPriority());

	cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);
	cbid = sceKernelCreateCallback("Power Callback", power_callback, NULL);
	scePowerRegisterCallback(0, cbid);

	sceKernelSleepThreadCB();

	return 0;
}
开发者ID:DSJim,项目名称:genesis4iphone,代码行数:17,代码来源:psp.c

示例7: xCallbackThread

static int xCallbackThread(SceSize args, void *argp)
{
    int cbid = sceKernelCreateCallback("xExitCallback", xExitCallback, 0);
    sceKernelRegisterExitCallback(cbid);
    sceKernelSleepThreadCB();
    return 0;
}
开发者ID:Falaina,项目名称:cspspemu,代码行数:7,代码来源:xlib.c

示例8: main

extern "C" int main(int argc, char *argv[]) {
	SceUID cb = sceKernelCreateCallback("refer", &cbFunc, (void *)0xDEADBEEF);
	SceKernelCallbackInfo info;
	info.size = sizeof(info);

	// Crashes.
	//testRefer("NULL info", cb, NULL);
	testRefer("Normal", cb, &info);

	checkpointNext("Sizes:");
	int sizes[] = {0, 1, 2, 4, 8, 44, 48, 52, 56, 60, 64, 68, 72, 128, 256, 1024, 0xFF00, 0xFF0000, 0x80000001, 0xCCCCCCCC, 0xFFFFFFFF};
	int i, result;
	for (i = 0; i < sizeof(sizes) / sizeof(sizes[0]); ++i) {
		info.size = sizes[i];
		result = sceKernelReferCallbackStatus(cb, &info);
		checkpoint("  %08x => %08x (result=%08x)", sizes[i], info.size, result);
	}

	sceKernelDeleteCallback(cb);

	info.size = sizeof(info);
	checkpointNext("Objects:");
	testRefer("NULL", 0, &info);
	testRefer("Invalid", 0xDEADBEEF, &info);
	testRefer("Deleted", cb, &info);

	return 0;
}
开发者ID:KentuckyCompass,项目名称:pspautotests,代码行数:28,代码来源:refer.cpp

示例9: CallbackThread

	/* Callback thread */
	int CallbackThread(SceSize args, void *argp)
	{
		int cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
		sceKernelRegisterExitCallback(cbid);
		sceKernelSleepThreadCB();
		return 0;
	}
开发者ID:Guthius,项目名称:gs2emu-googlecode,代码行数:8,代码来源:main.cpp

示例10: update_thread

static
int update_thread (SceSize args, void *argp)
{
	int cbid = sceKernelCreateCallback("Exit Callback", exit_callback, (void *) 0);
	sceKernelRegisterExitCallback(cbid);
	sceKernelSleepThreadCB();
	return 0;
}
开发者ID:Distrotech,项目名称:DirectFB,代码行数:8,代码来源:psp-setup.c

示例11: CallbackThread

/* Callback thread */
int CallbackThread(SceSize /*size*/, void *arg) {
	int cbid;

	cbid = sceKernelCreateCallback("Exit Callback", (SceKernelCallbackFunction)exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);
	/* Set up callbacks for PSPIoStream */

	cbid = sceKernelCreateCallback("Power Callback", (SceKernelCallbackFunction)power_callback, 0);
	if (cbid >= 0) {
		if (scePowerRegisterCallback(-1, cbid) < 0) {
			PSP_ERROR("Couldn't register callback for power_callback\n");
		}
	} else {
		PSP_ERROR("Couldn't create a callback for power_callback\n");
	}

	sceKernelSleepThreadCB();
	return 0;
}
开发者ID:AdamRi,项目名称:scummvm-pink,代码行数:20,代码来源:psp_main.cpp

示例12: callbacks_thread

    int callbacks_thread(unsigned int, void*)
    {
        int id;

        id = sceKernelCreateCallback("exit_cb", callbacks_exit, NULL);
        sceKernelRegisterExitCallback(id);
        sceKernelSleepThreadCB();

        return 0;
    }
开发者ID:libcg,项目名称:extremetuxracer-psp,代码行数:10,代码来源:main.cpp

示例13: main

int main(int argc, char **argv) {
    SceUID cb_id;
 
    cb_id = sceKernelCreateCallback("MSCB", ms_callback, (void *)0x777);
	printf("cb_id: %08X\n", (cb_id > 0) ? 1 : 0);
    printf("MScmRegisterMSInsertEjectCallback: %08X\n", MScmRegisterMSInsertEjectCallback(cb_id));
    printf("sceKernelCheckCallback: %08X\n", sceKernelCheckCallback());
    printf("MScmUnregisterMSInsertEjectCallback: %08X\n", MScmUnregisterMSInsertEjectCallback(cb_id));
	printf("sceKernelDeleteCallback: %08X\n", sceKernelDeleteCallback(cb_id));
	
    return 0;
}
开发者ID:HomerSp,项目名称:pspautotests,代码行数:12,代码来源:mstick.c

示例14: DEBUG_ENTER_FUNC

// this function gets called by PspThread when starting the new thread
void MasterGuRenderer::threadFunction() {
	DEBUG_ENTER_FUNC();

	// Create the callback. It should always get the pointer to MasterGuRenderer
	_callbackId = sceKernelCreateCallback("Display Callback", guCallback, this);
	if (_callbackId < 0) {
		PSP_ERROR("failed to create display callback\n");
	}

	PSP_DEBUG_PRINT("created callback. Going to sleep\n");

	sceKernelSleepThreadCB();	// sleep until we get a callback
}
开发者ID:danzat,项目名称:scummvm,代码行数:14,代码来源:display_manager.cpp

示例15: CallbackThread

/* Callback thread */
int CallbackThread(SceSize args, void *argp)
{
	int cbid;

	printf("\nCallback Thread Status:\n");
	dump_threadstatus();
	cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
	sceKernelRegisterExitCallback(cbid);

	sceKernelSleepThreadCB();

	return 0;
}
开发者ID:joshdekock,项目名称:jim-psp,代码行数:14,代码来源:main.c


注:本文中的sceKernelCreateCallback函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。