From 11b427faaa5ed7f446f6825281c718809cc23e68 Mon Sep 17 00:00:00 2001 From: EkeEke Date: Tue, 29 Oct 2013 00:00:12 +0100 Subject: [PATCH] [Wii/Gamecube] DVD interface is now only initialized when needed --- gx/fileio/file_load.c | 7 +++++++ gx/main.c | 8 +------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gx/fileio/file_load.c b/gx/fileio/file_load.c index 5c51afe..e896c4e 100644 --- a/gx/fileio/file_load.c +++ b/gx/fileio/file_load.c @@ -88,6 +88,13 @@ static int MountDVD(void) { GUI_MsgBoxOpen("Information", "Mounting DVD ...",1); + /* initialize DVD interface if needed */ +#ifdef HW_RVL + DI_Init(); +#else + DVD_Init(); +#endif + /* check if DVD is already mounted */ if (dvd_mounted) { diff --git a/gx/main.c b/gx/main.c index 1f222c7..be907b0 100644 --- a/gx/main.c +++ b/gx/main.c @@ -472,9 +472,8 @@ int main (int argc, char *argv[]) /* enable 64-byte fetch mode for L2 cache */ L2Enhance(); - /* initialize DI interface */ + /* disable DVD cache */ DI_UseCache(0); - DI_Init(); /* autodetect loader arguments */ if ((argc >= 3) && (argv[1] != NULL)) @@ -499,11 +498,6 @@ int main (int argc, char *argv[]) /* initialize video engine */ gx_video_Init(); -#ifndef HW_RVL - /* initialize DVD interface */ - DVD_Init(); -#endif - /* initialize input engine */ gx_input_Init();