From 5d6a361d03d37ae4271ca8bc8a37ca8f1b734fa5 Mon Sep 17 00:00:00 2001 From: giantpune Date: Tue, 7 Jul 2009 13:47:37 +0000 Subject: [PATCH] prompt to install game if a disc is inserted --- source/menu.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/source/menu.cpp b/source/menu.cpp index 70d8fd40..100281c5 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -36,7 +36,9 @@ #include "sys.h" #include "wpad.h" #include "listfiles.h" -#include "fatmounter.h" +#include "fatmounter.h" + +#include "usbloader/wdvd.h" #define MAX_CHARACTERS 38 @@ -219,6 +221,12 @@ int MenuDiscList() int selectImg1 = 0; char ID[4]; char IDfull[7]; + u32 covert = 0; + + + WDVD_GetCoverStatus(&covert); + u32 covertOld=covert; + //SCREENSAVER //WPad_SetIdleTime(300); //needs the time in seconds @@ -609,6 +617,8 @@ int MenuDiscList() WindowPrompt(0,idiotBuffer,tr("Ok")); idiotFlag=-1;} + WDVD_GetCoverStatus(&covert); + // if the idiot is showing favoorites and don't have any if (Settings.fave && !gameCnt){ WindowPrompt(tr("No Favorites"),tr("You are choosing to display favorites and you do not have any selected."),tr("Back")); @@ -709,7 +719,7 @@ int MenuDiscList() else if (Settings.gameDisplay==grid){gameGrid->SetFocus(1);} else if (Settings.gameDisplay==carousel){gameCarousel->SetFocus(1);} } - else if(installBtn.GetState() == STATE_CLICKED) + else if((installBtn.GetState() == STATE_CLICKED)||((covert & 0x2)&&(covert!=covertOld))) { choice = WindowPrompt(tr("Install a game"),0,tr("Yes"),tr("No")); if (choice == 1) @@ -725,7 +735,7 @@ int MenuDiscList() else if (Settings.gameDisplay==carousel){gameCarousel->SetFocus(1);} } } - + else if(sdcardBtn.GetState() == STATE_CLICKED) { @@ -1224,6 +1234,7 @@ int MenuDiscList() screensaverIsOn=WindowScreensaver(); if (screensaverIsOn==1)check=0; } + covertOld=covert; } HaltGui();