mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-23 10:21:55 +01:00
*Fixed codedumps at startup
This commit is contained in:
parent
c2a20e4c83
commit
1e665874ba
@ -16,6 +16,8 @@ int USBDevice_Init()
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
//closing all open Files write back the cache and then shutdown em!
|
//closing all open Files write back the cache and then shutdown em!
|
||||||
|
__io_usbstorage.startup();
|
||||||
|
|
||||||
fatUnmount("USB:/");
|
fatUnmount("USB:/");
|
||||||
//right now only mounts first partition
|
//right now only mounts first partition
|
||||||
if (fatMount("USB", &__io_usbstorage, 0, CACHE, SECTORS)) {
|
if (fatMount("USB", &__io_usbstorage, 0, CACHE, SECTORS)) {
|
||||||
@ -29,6 +31,7 @@ void USBDevice_deInit()
|
|||||||
return;
|
return;
|
||||||
//closing all open Files write back the cache and then shutdown em!
|
//closing all open Files write back the cache and then shutdown em!
|
||||||
fatUnmount("USB:/");
|
fatUnmount("USB:/");
|
||||||
|
__io_usbstorage.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
int isSdInserted()
|
int isSdInserted()
|
||||||
@ -39,6 +42,8 @@ int isSdInserted()
|
|||||||
int SDCard_Init()
|
int SDCard_Init()
|
||||||
{
|
{
|
||||||
//closing all open Files write back the cache and then shutdown em!
|
//closing all open Files write back the cache and then shutdown em!
|
||||||
|
__io_wiisd.startup();
|
||||||
|
|
||||||
fatUnmount("SD:/");
|
fatUnmount("SD:/");
|
||||||
//right now only mounts first partition
|
//right now only mounts first partition
|
||||||
if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS))
|
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!
|
//closing all open Files write back the cache and then shutdown em!
|
||||||
fatUnmount("SD:/");
|
fatUnmount("SD:/");
|
||||||
|
__io_wiisd.shutdown();
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,10 @@ void GuiGameGrid::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
void GuiGameGrid::Reload(struct discHdr * l, int count)
|
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 game[i];
|
||||||
delete coverImg[i];
|
delete coverImg[i];
|
||||||
@ -475,7 +478,6 @@ void GuiGameGrid::Reload(struct discHdr * l, int count)
|
|||||||
delete [] cover;
|
delete [] cover;
|
||||||
delete [] coverImg;
|
delete [] coverImg;
|
||||||
|
|
||||||
LOCK(this);
|
|
||||||
gameList = l;
|
gameList = l;
|
||||||
gameCnt = count;
|
gameCnt = count;
|
||||||
changed=0;
|
changed=0;
|
||||||
|
@ -96,11 +96,13 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
Sys_Init();
|
Sys_Init();
|
||||||
|
|
||||||
|
/** PAD_Init has to be before InitVideo don't move that **/
|
||||||
|
PAD_Init(); // initialize PAD/WPAD
|
||||||
|
Wpad_Init();
|
||||||
|
|
||||||
InitVideo(); // Initialise video
|
InitVideo(); // Initialise video
|
||||||
InitAudio(); // Initialize audio
|
InitAudio(); // Initialize audio
|
||||||
|
|
||||||
PAD_Init(); // initialize PAD/WPAD
|
|
||||||
Wpad_Init();
|
|
||||||
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
|
||||||
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ogcsys.h>
|
#include <ogcsys.h>
|
||||||
|
#include <ogc/pad.h>
|
||||||
|
|
||||||
#include "sys.h"
|
#include "sys.h"
|
||||||
#include "wpad.h"
|
#include "wpad.h"
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#ifndef _WPAD_H_
|
#ifndef _WPAD_H_
|
||||||
#define _WPAD_H_
|
#define _WPAD_H_
|
||||||
|
|
||||||
#include <wiiuse/wpad.h>
|
#include <wiiuse/wpad.h>
|
||||||
#include <ogc/pad.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
Loading…
Reference in New Issue
Block a user