*Fixed codedumps at startup

This commit is contained in:
dimok321 2009-06-05 15:43:32 +00:00
parent c2a20e4c83
commit 1e665874ba
5 changed files with 17 additions and 7 deletions

View File

@ -16,6 +16,8 @@ int USBDevice_Init()
{
return 0;
//closing all open Files write back the cache and then shutdown em!
__io_usbstorage.startup();
fatUnmount("USB:/");
//right now only mounts first partition
if (fatMount("USB", &__io_usbstorage, 0, CACHE, SECTORS)) {
@ -29,6 +31,7 @@ void USBDevice_deInit()
return;
//closing all open Files write back the cache and then shutdown em!
fatUnmount("USB:/");
__io_usbstorage.shutdown();
}
int isSdInserted()
@ -39,6 +42,8 @@ int isSdInserted()
int SDCard_Init()
{
//closing all open Files write back the cache and then shutdown em!
__io_wiisd.startup();
fatUnmount("SD:/");
//right now only mounts first partition
if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS))
@ -50,4 +55,5 @@ void SDCard_deInit()
{
//closing all open Files write back the cache and then shutdown em!
fatUnmount("SD:/");
__io_wiisd.shutdown();
}

View File

@ -464,7 +464,10 @@ void GuiGameGrid::Update(GuiTrigger * t)
void GuiGameGrid::Reload(struct discHdr * l, int count)
{
for(int i=0; i<pagesize; i++)
LOCK(this);
/**Removing old data **/
for(int i=0; i<pagesize; i++)
{
delete game[i];
delete coverImg[i];
@ -475,7 +478,6 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
delete [] cover;
delete [] coverImg;
LOCK(this);
gameList = l;
gameCnt = count;
changed=0;

View File

@ -96,11 +96,13 @@ main(int argc, char *argv[])
Sys_Init();
/** PAD_Init has to be before InitVideo don't move that **/
PAD_Init(); // initialize PAD/WPAD
Wpad_Init();
InitVideo(); // Initialise video
InitAudio(); // Initialize audio
PAD_Init(); // initialize PAD/WPAD
Wpad_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <ogcsys.h>
#include <ogcsys.h>
#include <ogc/pad.h>
#include "sys.h"
#include "wpad.h"

View File

@ -1,8 +1,7 @@
#ifndef _WPAD_H_
#define _WPAD_H_
#include <wiiuse/wpad.h>
#include <ogc/pad.h>
#include <wiiuse/wpad.h>
#ifdef __cplusplus
extern "C"