mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-tiny changes on port 1 usage and game boot
This commit is contained in:
parent
648d319925
commit
ceb91ca17b
@ -24,38 +24,16 @@
|
|||||||
#include "dip_plugin_249.h"
|
#include "dip_plugin_249.h"
|
||||||
#include "mload_modules.h"
|
#include "mload_modules.h"
|
||||||
|
|
||||||
u8 use_port1 = 0;
|
|
||||||
|
|
||||||
static int load_ehc_module_ex(void)
|
static int load_ehc_module_ex(void)
|
||||||
{
|
{
|
||||||
u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *)ehcmodule_5, size_ehcmodule_5);
|
u8 *ehc_cfg = search_for_ehcmodule_cfg((u8 *)ehcmodule_5, size_ehcmodule_5);
|
||||||
if(ehc_cfg)
|
if(ehc_cfg)
|
||||||
{
|
{
|
||||||
ehc_cfg += 12;
|
ehc_cfg += 12;
|
||||||
ehc_cfg[0] = use_port1;
|
ehc_cfg[0] = currentPort;
|
||||||
gprintf("EHC Port info = %i\n", ehc_cfg[0]);
|
gprintf("EHC Port info = %i\n", ehc_cfg[0]);
|
||||||
DCFlushRange((void *) (((u32)ehc_cfg[0]) & ~31), 32);
|
DCFlushRange((void *) (((u32)ehc_cfg[0]) & ~31), 32);
|
||||||
}
|
}
|
||||||
if(use_port1) // release port 0 and use port 1
|
|
||||||
{
|
|
||||||
u32 dat=0;
|
|
||||||
u32 addr;
|
|
||||||
|
|
||||||
// get EHCI base registers
|
|
||||||
mload_getw((void *) 0x0D040000, &addr);
|
|
||||||
|
|
||||||
addr&=0xff;
|
|
||||||
addr+=0x0D040000;
|
|
||||||
|
|
||||||
mload_getw((void *) (addr+0x44), &dat);
|
|
||||||
if((dat & 0x2001)==1)
|
|
||||||
mload_setw((void *) (addr+0x44), 0x2000);
|
|
||||||
|
|
||||||
mload_getw((void *) (addr+0x48), &dat);
|
|
||||||
|
|
||||||
if((dat & 0x2000)==0x2000)
|
|
||||||
mload_setw((void *) (addr+0x48), 0x1001);
|
|
||||||
}
|
|
||||||
load_ehc_module();
|
load_ehc_module();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -628,23 +628,22 @@ void CMenu::_game(bool launch)
|
|||||||
}
|
}
|
||||||
currentPartition = SD;
|
currentPartition = SD;
|
||||||
}
|
}
|
||||||
|
/* Get Banner Title for Playlog */
|
||||||
// Get banner_title
|
CurrentBanner.ClearBanner();
|
||||||
if(hdr->type == TYPE_CHANNEL)
|
if(hdr->type == TYPE_CHANNEL)
|
||||||
_extractChannelBnr(chantitle);
|
_extractChannelBnr(chantitle);
|
||||||
else if(hdr->type == TYPE_WII_GAME)
|
else if(hdr->type == TYPE_WII_GAME)
|
||||||
_extractBnr(hdr);
|
_extractBnr(hdr);
|
||||||
if(CurrentBanner.IsValid())
|
if(CurrentBanner.IsValid())
|
||||||
{
|
|
||||||
_extractBannerTitle(GetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()));
|
_extractBannerTitle(GetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()));
|
||||||
CurrentBanner.ClearBanner();
|
|
||||||
}
|
|
||||||
if(hdr->type != TYPE_HOMEBREW && hdr->type != TYPE_PLUGIN)
|
if(hdr->type != TYPE_HOMEBREW && hdr->type != TYPE_PLUGIN)
|
||||||
{
|
{
|
||||||
if(Playlog_Update(hdr->id, banner_title) < 0)
|
if(Playlog_Update(hdr->id, banner_title) < 0)
|
||||||
Playlog_Delete();
|
Playlog_Delete();
|
||||||
}
|
}
|
||||||
gprintf("Launching game %s\n", hdr->id);
|
gprintf("Launching game %s\n", hdr->id);
|
||||||
|
CurrentBanner.ClearBanner();
|
||||||
|
/* Finally boot it */
|
||||||
_launch(hdr);
|
_launch(hdr);
|
||||||
|
|
||||||
if(m_exit)
|
if(m_exit)
|
||||||
@ -799,7 +798,6 @@ void CMenu::_launchShutdown()
|
|||||||
CoverFlow.clear();
|
CoverFlow.clear();
|
||||||
_showWaitMessage();
|
_showWaitMessage();
|
||||||
exitHandler(PRIILOADER_DEF); //Making wiiflow ready to boot something
|
exitHandler(PRIILOADER_DEF); //Making wiiflow ready to boot something
|
||||||
CurrentBanner.ClearBanner();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_launch(dir_discHdr *hdr)
|
void CMenu::_launch(dir_discHdr *hdr)
|
||||||
|
Loading…
Reference in New Issue
Block a user