All pastes #119067 Raw Edit

Someone

public c v1 · immutable
·published 2006-08-06 16:59 UTC
rendered paste body
    pspDebugScreenSetXY(0, 0);    printf("%d internet configuration(s) found.\n\n", start);    printf("Select which configuration to use from\n");    printf("the list and press either %s or %s.\n", NSCROSS, NSCIRCLE);    i = 1;    while (i <= start) {      printf("  Configuration %d: %s\n", i, getconfname(i));      i++;    }    while (select) {          SceCtrlData pad, lastpad;    sceCtrlReadBufferPositive(&lastpad, 1);   if(pad.Buttons != lastpad.Buttons) {      lastpad = pad;       if (pad.Buttons & PSP_CTRL_UP) {        if (selComponent > 1) {          selComponent--;        }        sceKernelDelayThread(100 * 1000);      } else if (pad.Buttons & PSP_CTRL_DOWN) {        if (selComponent < start) {          selComponent++;        }        sceKernelDelayThread(100 * 1000);      }      if ((pad.Buttons & PSP_CTRL_CIRCLE) || (pad.Buttons & PSP_CTRL_CROSS)) {        select = 0;      }}      if (last != selComponent) {        if (last == 0) { last = 1; }        pspDebugScreenSetXY(0, 3 + last);        pspDebugScreenSetTextColor(WHITE);        printf("  Configuration %d: %s", last, getconfname(last));        pspDebugScreenSetXY(0, 3 + selComponent);        pspDebugScreenSetTextColor(RED);        printf("  Configuration %d: %s", selComponent, getconfname(selComponent));        pspDebugScreenSetTextColor(WHITE);      }      last = selComponent;      sceDisplayWaitVblankStart();    }    pspDebugScreenSetXY(0, 4 + start);    printf("\nUsing connection %d (%s) to connect...\n\n", selComponent, getconfname(selComponent));