⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 psp开发用的所有头文件。包含所有系统API。需要psp-gcc编译器。在www.psp-dev.com上有
💻 C
字号:
/* * PSP Software Development Kit - http://www.pspdev.org * ----------------------------------------------------------------------- * Licensed under the BSD license, see LICENSE in PSPSDK root for details. * * main.c - Basic sample to demonstrate the remote port sio. * * Copyright (c) 2005 James Forshaw <tyranid@gmail.com> * * $Id: main.c 1095 2005-09-27 21:02:16Z jim $ */#include <pspkernel.h>#include <pspdebug.h>#include <pspdisplay.h>#include <pspsdk.h>#include <pspctrl.h>#include <stdio.h>#include <string.h>PSP_MODULE_INFO("REMOTE", 0x1000, 1, 1);/* Define the main thread's attribute value (optional) */PSP_MAIN_THREAD_ATTR(0);int main(void){	pspDebugScreenInit();	sceCtrlSetSamplingCycle(0);	sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);		/* Initialise SIO and install a kprintf handler */	pspDebugSioInit();	pspDebugSioInstallKprintf();	/* Install a stdout handler */	pspDebugInstallStdoutHandler(pspDebugSioPutData);	Kprintf("Hi from %s!\n", "Kprintf");	printf("Also hi from stdio\r\n");	pspDebugScreenPrintf("Press X to exit, tap away on your terminal to echo\n");	sceDisplayWaitVblankStart();	while(1)	{		SceCtrlData pad;		int ch;		sceCtrlReadBufferPositive(&pad, 1);		if(pad.Buttons & PSP_CTRL_CROSS)		{			break;		}		ch = pspDebugSioGetchar();		if(ch >= 0)		{			pspDebugScreenPrintf("Received %d\n", ch);			if(ch == '\r')			{				pspDebugSioPutchar('\r');				pspDebugSioPutchar('\n');			}			else			{				pspDebugSioPutchar(ch);			}		}		sceDisplayWaitVblankStart();	}	sceKernelExitGame();	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -