#123953 - tondopie - Mon Apr 02, 2007 1:36 am
i was wondering how to launch a specific .nds file. so far I have this and it doesn't do anything.
when I run the file on my GBAMP and press the button, nothing happens...
Code: |
// Includes
#include <PA9.h> // Include for PA_Lib #include <fat.h> char text[200]; // This will be our text... void dscart(void){ // Function to execute when the button0 is pressed... FILE* ndsFile = fopen ("/DSLaunch.nds", "rb"); } // Function: main() int main(int argc, char ** argv) { PA_Init(); // Initializes PA_Lib PA_InitVBL(); // Initializes a standard VBL PA_Init8bitBg(0, 3); PAPI_Init(0); // Init the API on the bottom screen PA_InitText(0, 0); // Initialize the text system on the bottom screen PA_InitText(1, 0); // Initialize the text system on the top screen fatInitDefault(); PAPI_CreateButton(0, 120, 40, 64, 16, &dscart, "DS Launch", 1, 1); while (1) { PAPI_CheckButton(); // Check the buttons PA_WaitForVBL(); } return 0; } // End of main() |
when I run the file on my GBAMP and press the button, nothing happens...