|
Undefined Reference to WPAD_Init? October 06, 2008 09:46AM | Registered: 17 years ago Posts: 20 |
|
Re: Undefined Reference to WPAD_Init? October 06, 2008 12:12PM | Registered: 17 years ago Posts: 443 |
#include "wiiuse/wpad.h"or
#include <wiiuse/wpad.h>
|
Re: Undefined Reference to WPAD_Init? October 06, 2008 12:40PM | Registered: 17 years ago Posts: 114 |
|
Re: Undefined Reference to WPAD_Init? October 07, 2008 03:24AM | Registered: 17 years ago Posts: 20 |
#include stdio.h
#include stdlib.h
#include string.h
#include malloc.h
#include ogcsys.h
#include gccore.h
#include wiiuse/wpad.h //Added line
static void *xfb = NULL;
static GXRModeObj *rmode = NULL;
int main(int argc, char **argv) {
VIDEO_Init();
WPAD_Init();
PAD_Init();
switch(VIDEO_GetCurrentTvMode()) {
case VI_NTSC:
rmode = &TVNtsc480IntDf;
break;
case VI_PAL:
rmode = &TVPal528IntDf;
break;
case VI_MPAL:
rmode = &TVMpal480IntDf;
break;
default:
rmode = &TVNtsc480IntDf;
break;
}
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
console_init(xfb,20,20,rmode->fbWidth,rmode->xfbHeight,rmode->fbWidth*VI_DISPLAY_PIX_SZ);
VIDEO_Configure(rmode);
VIDEO_SetNextFramebuffer(xfb);
VIDEO_SetBlack(FALSE);
VIDEO_Flush();
VIDEO_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
printf(" ");
printf("This is a test of the Imperial Wii Communication System.");
while(1) {
WPAD_ScanPads(); //Added line
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME) exit(0); //Added line
VIDEO_WaitVSync();
}
return 0;
}