File Frontend For Gp2x


kounch

Still Fresh
Joined
Dec 20, 2005
Messages
84
Website
Visit site
Hi
i have made a GP2X general frontend to pass files to an executable with parameteres, so that you can, for example, select ROMS to load with the actual alfa version of gnuboy2x.

You can download it from the following post in gp32spain, including the source code (i have released it as GPL):

http://www.gp32spain.com/foros/showthread.php?t=25617


It is made using Rlyeh's minimal lib and it works the following way:

1.Copy to any place of the SD the file named "selector"
2.Make a configuration file (one example is included in the zip)
3.Make a launch script for selector (one example is included in the zip)

Once you launch the "selector" using the script, if you have included several command line options in the configuration file, use L and R to select the one you want to choose.
You can move through files and directories using the joystick. Use B,X, or the stick button to go into a directory or select a file to pass as argument to the command line and execute it.
If you want to exit the program, use the start button.

Regards
kounch
 
Damnit I was working on the exact same thing. I was having loads of trouble trying to figure out how to list files though despite the fact sdl,fonts, lists,executing elfs was fine I just had no idea how to list files.

Oh well good job anyway
 
chris_r posted on Dec 20 2005 at 02:25 AM said:
Damnit I was working on the exact same thing.  I was having loads of trouble trying to figure out how to list files though despite the fact sdl,fonts, lists,executing elfs was fine I just had no idea how to list files.

Oh well good job anyway
As the source code is included, if you are still working on it, perhaps it would help you to check in my program:

int filtraArchivos(char *directorio, char *listaArchivos[], int *numArchivos) where
- directorio is a string with the path of a directory to check
- fileFilters is an array of fileFiltersNum strings, each of one defining a file extension to accept

It will return an array listaArchivos of numArchivos strings with the filtered files and directories.


Then you can check int actualizaInterfaz(int coordenada,char *listaArchivos[],int numArchivos) where
- coordeanada keeps track of the selected file in the program interface
- listaArchivos and numArchivos are the ones returned by the previous function
- CONSOLELINES is a macro which defines how many lines of text of the interface are reserved for displaying files and directories

This function is the one that updates the display showing partial lists of files on the screen.


Hope this will help you

kounch
 
Last edited by a moderator:
Back
Top