Once again with my n00b questions, can somebody please help me with my source code? I am trying to make a program that (so far) will detect certain things. Here's what I have so far (and I can tell a bunch of it is wrong):
// Project 9 - Another of Sleepy's n00b projects...
/*
This program was begun by Sleepy on 12-22-06
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspdisplay.h>
#include <pspctrl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pspmscm.h>
#include "common/callbacks/standard.h"
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("Project 9", 0x1000, 1, 1); //Learned from Booster
PSP_MAIN_THREAD_ATTR(0); //Learned from dot_blank
int main() {
pspDebugScreenInit();
SetupCallbacks();
SceCtrlData pad;
int sceWlanDevIsPowerOn(void) {
if (1) { //I'm trying to say 'if it returns 1'
printf("WLAN switch is on\n");
}
else if (0) { //I'm trying to say 'if it returns 0'
printf("WLAN switch is off\n");
}
return 0;
}
int sceUmdCheckMedium(void) {
if (0) { //Trying to say 'if it returns 0'
printf("No UMD inserted\n");
}
else if (1) { //Trying to say 'if it returns 1'
printf("UMD inserted\n");
}
return 0;
}
printf("Project 9 by Sleepy. Press [X] to exit.\n");
while(1) {
sceCtrlReadBufferPositive(&pad, 1);
if(pad.Buttons & PSP_CTRL_CROSS) {
sceKernelExitGame();
}
}
return 0;
}
Yeah... so I know it looks bad but I need to start somewhere, right?
And I also want to check for (possibly write to) the memory stick, but when I checked out mscm.h it only told me how to respond to somebody inserting or ejecting it.
int sceUmdCheckMedium(void) {
if (0) { //Trying to say 'if it returns 0'
printf("No UMD inserted\n");
}
else if (1) { //Trying to say 'if it returns 1'
printf("UMD inserted\n");
}
return 0;
}
¿If what returns 0 or 1?
Probably the forum at http://www.psp-programming.com is a better place for this question although they aren't working now.