From 3b6375670a34a15d5d11bfe7488e238a6d371b76 Mon Sep 17 00:00:00 2001 From: ekeeke31 Date: Mon, 8 Dec 2008 11:24:04 +0000 Subject: [PATCH] fixed wii power-off, compatibility fixes for libfat 20081205 --- history.txt | 11 +++++------ source/ngc/gui/filesel.c | 3 ++- source/ngc/gui/menu.c | 14 -------------- source/ngc/ngc.c | 5 ++--- source/ngc/ogc_input.c | 16 +++++++++++++++- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/history.txt b/history.txt index 09abdbd..e7d1934 100644 --- a/history.txt +++ b/history.txt @@ -1,11 +1,10 @@ Genesis Plus for Gamecube ------------------------------ -CURRENT: ---------- - +08/12/2008: +----------- [Genesis] -- YM2612(MAME): +- YM2612 bugfixes (MAME core): .fixed EG Decay->Substain transition when SL & DR are minimals: fix tracks #3 and #9 in "Mega Turrican" .fixed a bug in SSG-EG emulation code: fix Level 1 music in "Alisia Dragoon" .modified SSG-EG Decay End Level: fix some sound effects (ChainSaw, Zap...) in "Beavis & Butthead" @@ -27,6 +26,7 @@ CURRENT: - removed embedded font, (re)enabled IPL font support: now should works for Qoob users too (thanks to emukiddid) - fixed "Reset" button behavior, now acts more like Genesis Reset button ;-) - minor bugfixes and menu tweaks +- compiled with libogc 1.7.0 [NGC only] - added 480p support in menu @@ -34,8 +34,7 @@ CURRENT: [Wii only] - implemented fast scrolling in menu using Wiimote D-PAD - added "Power" button support -- improved SDCARD access speed (svpe's "read-ahead" patch) -- compiled with libogc CVS: SDHC support, Wiimote shutdown button support +- libogc 1.7.0 features (SDHC support , Wiimote shutdown button support) diff --git a/source/ngc/gui/filesel.c b/source/ngc/gui/filesel.c index 5407c26..0b7acf7 100644 --- a/source/ngc/gui/filesel.c +++ b/source/ngc/gui/filesel.c @@ -16,8 +16,9 @@ #include "fileio.h" #include "history.h" #include "dvd.h" + #ifdef HW_RVL -#include "di/di.h" +#include #endif #define PAGESIZE 12 diff --git a/source/ngc/gui/menu.c b/source/ngc/gui/menu.c index 51ff13b..bcfb742 100644 --- a/source/ngc/gui/menu.c +++ b/source/ngc/gui/menu.c @@ -1108,20 +1108,6 @@ void MainMenu () while (quit == 0) { - -#ifdef HW_RVL - /* wii shutdown */ - if (Shutdown) - { - /* autosave SRAM/State */ - memfile_autosave(); - - /* shutdown Wii */ - DI_Close(); - SYS_ResetSystem(SYS_POWEROFF, 0, 0); - } -#endif - crccheck = crc32 (0, &sram.sram[0], 0x10000); if (genromsize && (crccheck != sram.crc)) strcpy (menutitle, "*** SRAM has been modified ***"); else sprintf(menutitle, "%d FPS", FramesPerSecond); diff --git a/source/ngc/ngc.c b/source/ngc/ngc.c index c4465f3..860be48 100644 --- a/source/ngc/ngc.c +++ b/source/ngc/ngc.c @@ -25,7 +25,7 @@ #ifdef HW_DOL #include "dvd.h" #else -#include "di/di.h" +#include #endif int Shutdown = 0; @@ -144,11 +144,10 @@ int main (int argc, char *argv[]) SYS_SetPowerCallback(Power_Off); #endif - /* Initialize SDCARD Interface (LibFAT) */ + /* Initialize FAT Interface */ if (fatInitDefault() == true) { use_FAT = 1; - fatEnableReadAhead (PI_DEFAULT, 6, 64); } /* Default Config */ diff --git a/source/ngc/ogc_input.c b/source/ngc/ogc_input.c index 022c01a..e13bfa9 100644 --- a/source/ngc/ogc_input.c +++ b/source/ngc/ogc_input.c @@ -24,6 +24,7 @@ #ifdef HW_RVL #include +#include #endif /* configurable keys */ @@ -739,7 +740,20 @@ void ogc_input__config(u8 num, u8 type, u8 padtype) u16 ogc_input__getMenuButtons(void) { - /* slowdown input updates */ + +#ifdef HW_RVL + if (Shutdown) + { + /* autosave SRAM/State */ + memfile_autosave(); + + /* shutdown Wii */ + DI_Close(); + SYS_ResetSystem(SYS_POWEROFF, 0, 0); + } +#endif + +/* slowdown input updates */ VIDEO_WaitVSync(); /* get gamepad inputs */