Commit fa0f59b8 authored by Donald Haase's avatar Donald Haase
Browse files

Remove the list/scene finish in the A-button case of songmenu. Main presumes...

Remove the list/scene finish in the A-button case of songmenu. Main presumes that songmenu leaves the TR list unfinished. Rest is whitespace changes only
parent 2ef76cd7
......@@ -144,7 +144,7 @@ extern char fpsout[138];
static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10); }
/* Program entry */
int main(int argc, char **argv) {
int main(int argc, char **argv) {
int disc_status, last_disc_status, disc_type, checkvcd, isvcd;
uint32 params[4];
......@@ -183,18 +183,16 @@ int main(int argc, char **argv) {
//" VC/DC 0.2 (C)2006-2009 ");
VCDC_VERSION);
/* Song menu */
switch (menu){
switch (menu) {
case 0:
song_menu_render();
if (disc_type==0x20 && checkvcd==0){
if (disc_type==0x20 && checkvcd==0) {
checkvcd = 1;
isvcd = open_vcd();
if (isvcd)
{
if (isvcd) {
vmu_set_icon(vcdcontrols_xpm);
/* End of translucent list */
......@@ -210,22 +208,15 @@ int main(int argc, char **argv) {
Start_Pbc();
goto scenestart;
}
}
break;
case 1:
break;
}
/* Allow the user to replay a VCD without opening the lid */
if (isvcd==1)
{
if (check_start())
{
if (isvcd==1) {
if (check_start()) {
vmu_set_icon(vcdcontrols_xpm);
/* End of translucent list */
......@@ -239,7 +230,6 @@ int main(int argc, char **argv) {
}
}
/* End of translucent list */
pvr_list_finish();
......@@ -250,30 +240,22 @@ int main(int argc, char **argv) {
vmu_lcd_update();
cdrom_get_status(&disc_status, &disc_type);
if( (disc_status == 6) || (disc_status == 7) )
{
if( (disc_status == 6) || (disc_status == 7)) {
strcpy(curdir, "/cd");
menu = 1;
num_entries = 0; checkvcd = 0; load_queued = 0; isvcd = 0;
lst_size = 0; selected = 0; top = 0;
if (!(disc_status == last_disc_status)) close_vcd();
if (!(disc_status == last_disc_status))
close_vcd();
last_disc_status = disc_status;
} else if (disc_status == 1){
} else if (disc_status == 1) {
last_disc_status = disc_status;
menu = 0;
}
}
/* Stop the sound */
spu_disable();
return 0;
}
......@@ -175,8 +175,8 @@ static void stop() {
/* Handle controller input */
/* static uint8 mcont = 0; */
static void set_eq_menu() /* Set our 32-band graphic equalizer */
{
/* Set our 32-band graphic equalizer */
static void set_eq_menu() {
int i, in_menu = 1, band = 0, up_moved = 0, down_moved = 0, left_moved = 0, right_moved = 0,
a_pressed = 0;
static int band_value[32] = {
......@@ -300,8 +300,7 @@ static void set_eq_menu() /* Set our 32-band graphic equalizer */
#define TOTAL_MENU_ITEMS 4
extern int pbc_switch;
/* This would probably make more sense with some sort of a struct for the menu items, but whatever. */
static void settings_menu()
{
static void settings_menu() {
static int up_moved = 0, down_moved = 0, left_moved = 0, right_moved = 0,
a_pressed = 0, in_menu = 1, selection = 0, menu_item = 0;
static int last_selection[TOTAL_MENU_ITEMS];
......@@ -425,6 +424,7 @@ static void settings_menu()
}
if(menu_item==2 && selection==2)set_eq_menu();
}
void check_controller() {
static int up_moved = 0, down_moved = 0, a_pressed = 0, y_pressed = 0, x_pressed = 0;
static maple_device_t * mcont = NULL;
......@@ -450,7 +450,7 @@ void check_controller() {
if ((framecnt - down_moved) > 10) {
if (selected < (num_entries - 1)) {
selected++;
// if (selected >= (top+14)) {
// if (selected >= (top+14)) {
if (selected >= (top+10)) {
top++;
}
......@@ -460,7 +460,7 @@ void check_controller() {
}
if (state->ltrig > 0) {
if ((framecnt - up_moved) > 10) {
// selected -= 14;
// selected -= 14;
selected -= 10;
if (selected < 0) selected = 0;
......@@ -470,11 +470,11 @@ void check_controller() {
}
if (state->rtrig > 0) {
if ((framecnt - down_moved) > 10) {
// selected += 14;
// selected += 14;
selected += 10;
if (selected > (num_entries - 1))
selected = num_entries - 1;
// if (selected >= (top+14))
// if (selected >= (top+14))
if (selected >= (top+10))
top = selected;
down_moved = framecnt;
......@@ -482,8 +482,7 @@ void check_controller() {
}
if ((state->buttons & CONT_Y)) {
if ((framecnt - y_pressed) > 10)
{
if ((framecnt - y_pressed) > 10) {
strcat(workstring,curdir);
strcat(workstring,"/");
strcat(workstring,entries[selected].fn);
......@@ -501,7 +500,7 @@ void check_controller() {
}
if ((state->buttons & CONT_X) ) {
if ((framecnt - x_pressed) > 10){
if ((framecnt - x_pressed) > 10) {
/* End of translucent list */
pvr_list_finish();
......@@ -525,26 +524,23 @@ void check_controller() {
}
}
if ((state->buttons & CONT_A) && !load_queued) {
if ((framecnt - a_pressed) > 10)
{
if ((framecnt - a_pressed) > 10) {
/* End of translucent list */
pvr_list_finish();
/* Finish the frame *******************************/
pvr_scene_finish();
if (!strcmp(entries[selected].fn, "Error!"))
{
if (!strcmp(entries[selected].fn, "Error!")) {
num_entries = 0;
}
else if (lst_size > 0)
{
else if (lst_size > 0) {
printf("DEBUG: Playing playlist...\r\n");
lst_playing=0;
stop();
for (lst_playing=0;lst_playing < lst_size; lst_playing++)
{
for (lst_playing=0;lst_playing < lst_size; lst_playing++) {
if (lst_entries[lst_playing].size > 0)
start(lst_entries[lst_playing].fn);
thd_sleep(100);
......@@ -553,8 +549,7 @@ void check_controller() {
y_pressed=framecnt; /* We do this because in-movie, 'Y' is stop. */
x_pressed=framecnt;
}
else if (entries[selected].size >= 0)
{
else if (entries[selected].size >= 0) {
char *ext;
stop();
strcpy(playdir,curdir);
......@@ -563,11 +558,11 @@ void check_controller() {
strcat(loadme,entries[selected].fn);
ext = (char *)(strchr(entries[selected].fn, '.')+1);
if(!strcasecmp(ext,"bin"))
{
if(!strcasecmp(ext,"bin")) {
vmu_set_icon(vcdcontrols_xpm);
play_vcd_image(loadme);
}else{
}
else {
start(loadme);
}
loadme[0]=0;
......@@ -575,26 +570,20 @@ void check_controller() {
y_pressed=framecnt; /* We do this because in-movie, 'Y' is stop. */
x_pressed=framecnt;
}
else
{
if (!strcmp(entries[selected].fn, "<..>"))
{
else {
if (!strcmp(entries[selected].fn, "<..>")) {
int i;
for (i=strlen(curdir); i>0; i--)
{
if (curdir[i] == '/')
{
for (i=strlen(curdir); i>0; i--) {
if (curdir[i] == '/') {
curdir[i] = 0;
break;
}
else
{
else {
curdir[i] = 0;
}
}
}
else
{
else {
if (strcmp(curdir, "/"))
strcat(curdir, "/");
strcat(curdir, entries[selected].fn);
......@@ -617,9 +606,6 @@ void check_controller() {
/* Translucent list ********************************/
draw_listing();
pvr_list_finish();
pvr_scene_finish();
}
a_pressed = framecnt;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment