mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
Fixed path of banner.bin in GamelistCtrl not getting the good TitleID, replaced fullscreen on Esc key by Alt+Enter, Esc now escape fullscreen or stop emulation (as requested, but i find it better too)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3101 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include "ColorUtil.h"
|
||||
#include "BannerLoaderWii.h"
|
||||
#include "FileUtil.h"
|
||||
#include "../../Core/Src/VolumeHandler.h"
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
@ -32,11 +33,13 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem)
|
||||
, m_IsValid(false)
|
||||
{
|
||||
char Filename[260];
|
||||
char TitleID[4];
|
||||
|
||||
_rFileSystem.GetVolume()->Read(0, 4, (u8*)TitleID);
|
||||
sprintf(Filename, FULL_WII_USER_DIR "title/00010000/%02x%02x%02x%02x/data/banner.bin",
|
||||
(u8)TitleID[0], (u8)TitleID[1], (u8)TitleID[2], (u8)TitleID[3]);
|
||||
u64 TitleID;
|
||||
|
||||
_rFileSystem.GetVolume()->RAWRead((u64)0x0F8001DC, 8, (u8*)&TitleID);
|
||||
TitleID = Common::swap64(TitleID);
|
||||
|
||||
sprintf(Filename, FULL_WII_USER_DIR "title/%08x/%08x/data/banner.bin",
|
||||
(u32)(TitleID>>32), (u32)TitleID);
|
||||
|
||||
if (!File::Exists(Filename))
|
||||
{
|
||||
|
@ -166,8 +166,6 @@ bool CFileSystemGCWii::InitFileSystem()
|
||||
}
|
||||
else
|
||||
{
|
||||
// Mario Kart Wii gets here on its third partition...
|
||||
// Does it use a fake partition ? another type we don't know ?
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -178,8 +178,10 @@ int abc = 0;
|
||||
case OPENGL_WM_USER_CREATE:
|
||||
// We don't have a local setting for bRenderToMain but we can detect it this way instead
|
||||
//PanicAlert("main call %i %i %i %i", lParam, (HWND)Core::GetWindowHandle(), MSWGetParent_((HWND)Core::GetWindowHandle()), (HWND)this->GetHWND());
|
||||
if (lParam == NULL) main_frame->bRenderToMain = false;
|
||||
else main_frame->bRenderToMain = true;
|
||||
if (lParam == NULL)
|
||||
main_frame->bRenderToMain = false;
|
||||
else
|
||||
main_frame->bRenderToMain = true;
|
||||
return 0;
|
||||
|
||||
case NJOY_RELOAD:
|
||||
@ -470,7 +472,6 @@ void CFrame::OnClose(wxCloseEvent& event)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
{
|
||||
switch (event.GetId())
|
||||
@ -496,13 +497,25 @@ void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||
|
||||
void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
// Toggle fullscreen from Alt + Enter or Esc
|
||||
if (((event.GetKeyCode() == WXK_RETURN) && (event.GetModifiers() == wxMOD_ALT)) ||
|
||||
(event.GetKeyCode() == WXK_ESCAPE))
|
||||
// Escape key turn off fullscreen then Stop emulation in windowed mode
|
||||
if (event.GetKeyCode() == WXK_ESCAPE)
|
||||
{
|
||||
ShowFullScreen(!IsFullScreen());
|
||||
if (IsFullScreen())
|
||||
{
|
||||
ShowFullScreen(false);
|
||||
MSWSetCursor(true);
|
||||
}
|
||||
else
|
||||
DoStop();
|
||||
|
||||
UpdateGUI();
|
||||
}
|
||||
if (event.GetKeyCode() == WXK_RETURN && event.GetModifiers() == wxMOD_ALT)
|
||||
{
|
||||
// For some reasons, wxWidget doesn't proccess the Alt+Enter event there on windows.
|
||||
// But still, pressing Alt+Enter make it Fullscreen, So this is for other OS... :P
|
||||
ShowFullScreen(!IsFullScreen());
|
||||
}
|
||||
#ifdef _WIN32
|
||||
if(event.GetKeyCode() == 'E','M') // Send this to the video plugin WndProc
|
||||
{
|
||||
@ -596,8 +609,9 @@ void CFrame::OnDoubleClick(wxMouseEvent& event)
|
||||
MSWSetCursor(true); // Show the cursor again, in case it was hidden
|
||||
#endif
|
||||
m_fLastClickTime -= 10; // Don't treat repeated clicks as double clicks
|
||||
}
|
||||
// --------------------------
|
||||
}
|
||||
|
||||
UpdateGUI();
|
||||
}
|
||||
|
||||
|
||||
|
@ -579,6 +579,11 @@ void CFrame::DoStop()
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
// Ask for confirmation in case the user accidently clicked Stop / Escape
|
||||
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||
if(!AskYesNo("Are you sure you want to stop the current emulation?", "Confirm", wxYES_NO))
|
||||
return;
|
||||
|
||||
Core::Stop();
|
||||
|
||||
/* This is needed together with the option to not "delete g_EmuThread" in Core.cpp, because then
|
||||
@ -600,19 +605,7 @@ void CFrame::DoStop()
|
||||
|
||||
void CFrame::OnStop(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
// Ask for confirmation in case the user accidently clicked Stop
|
||||
bool answer;
|
||||
if(SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||
{
|
||||
answer = AskYesNo("Are you sure you want to stop the current emulation?",
|
||||
"Confirm", wxYES_NO);
|
||||
}
|
||||
else
|
||||
{
|
||||
answer = true;
|
||||
}
|
||||
|
||||
if (answer) DoStop();
|
||||
DoStop();
|
||||
}
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
Reference in New Issue
Block a user