Commit 205b1d48 authored by Donald Haase's avatar Donald Haase
Browse files

Clean up cd handling stuff

parent a2e57710
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -132,22 +132,11 @@ extern int num_entries;
extern int selected, top;
extern int lst_size;
extern volatile int load_queued;
extern char fpsout[138];

/* Copied in from KOS kernel/arch/dreamcast/hardware/cdrom.c */
#define MAKE_SYSCALL(rs, p1, p2, idx) \
	uint32 *syscall_bc = (uint32*)0x8c0000bc; \
	int (*syscall)() = (int (*)())(*syscall_bc); \
	rs syscall((p1), (p2), 0, (idx));

/* Set disc access mode */
static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10); }

/* Program entry */
    int main(int argc, char **argv) {

    int disc_status, last_disc_status, disc_type, checkvcd, isvcd;
    uint32 params[4];

    checkvcd = 0; isvcd = 0;

@@ -155,7 +144,6 @@ static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10
    cont_btn_callback(0, CONT_START | CONT_A | CONT_B | CONT_X | CONT_Y,
    (cont_btn_callback_t)arch_exit);


    /* Do basic setup */
    pvr_init_defaults();

@@ -240,7 +228,7 @@ static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10
        vmu_lcd_update();

        cdrom_get_status(&disc_status, &disc_type);
        if( (disc_status == 6) || (disc_status == 7)) {
        if( (disc_status == CD_STATUS_OPEN) || (disc_status == CD_STATUS_NO_DISC)) {
            strcpy(curdir, "/cd");
            menu = 1;
            num_entries = 0; checkvcd = 0; load_queued = 0; isvcd = 0;
@@ -248,7 +236,7 @@ static int gdc_change_data_type(void *param) { MAKE_SYSCALL(return, param, 0, 10
            if (!(disc_status == last_disc_status)) 
                close_vcd();
            last_disc_status = disc_status;
        } else if (disc_status == 1) {
        } else if (disc_status == CD_STATUS_PAUSED) {
            last_disc_status = disc_status;
            menu = 0;
        }
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static int check_buttons() /* Checks all of our buttons */
{
int disc_status, disc_type;
      cdrom_get_status(&disc_status, &disc_type);
		if( (disc_status == 6) || (disc_status == 7) )
        if( (disc_status == CD_STATUS_OPEN) || (disc_status == CD_STATUS_NO_DISC))
		{
		  return BUTTON_STOP;
		}