mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Minor bugfixes : disable Refresh list and Load wii menu when game is running and fix silly init of njoy's rumble
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2973 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
@ -463,7 +463,7 @@ void CConfigMain::CreateGUIControls()
|
|||||||
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
|
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
|
||||||
|
|
||||||
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
|
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||||
sISOButtons->Add(RecersiveISOPath, 0, wxALL, 0);
|
sISOButtons->Add(RecersiveISOPath, 0, wxALL|wxALIGN_CENTER, 0);
|
||||||
sISOButtons->AddStretchSpacer(1);
|
sISOButtons->AddStretchSpacer(1);
|
||||||
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
|
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
|
||||||
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
|
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2003-2008 Dolphin Project.
|
// Copyright (C) 2003-2009 Dolphin Project.
|
||||||
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
// it under the terms of the GNU General Public License as published by
|
// it under the terms of the GNU General Public License as published by
|
||||||
@ -254,7 +254,6 @@ EVT_MENU(IDM_CONFIG_DSP_PLUGIN, CFrame::OnPluginDSP)
|
|||||||
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
|
EVT_MENU(IDM_CONFIG_PAD_PLUGIN, CFrame::OnPluginPAD)
|
||||||
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
||||||
|
|
||||||
|
|
||||||
#ifdef MUSICMOD
|
#ifdef MUSICMOD
|
||||||
EVT_MENU(IDM_MUTE, CFrame::MM_OnMute)
|
EVT_MENU(IDM_MUTE, CFrame::MM_OnMute)
|
||||||
EVT_MENU(IDM_MUSIC_PLAY, CFrame::MM_OnPause)
|
EVT_MENU(IDM_MUSIC_PLAY, CFrame::MM_OnPause)
|
||||||
@ -262,6 +261,7 @@ EVT_COMMAND_SCROLL(IDS_VOLUME, CFrame::MM_OnVolume)
|
|||||||
EVT_MENU(IDT_LOG, CFrame::MM_OnLog)
|
EVT_MENU(IDT_LOG, CFrame::MM_OnLog)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
||||||
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
||||||
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
|
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
|
||||||
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
|
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
|
||||||
@ -430,7 +430,8 @@ void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
|
|||||||
|
|
||||||
void CFrame::OnClose(wxCloseEvent& event)
|
void CFrame::OnClose(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
// Don't forget the skip of the window won't be destroyed
|
|
||||||
|
// Don't forget the skip or the window won't be destroyed
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
#include "CDUtils.h"
|
#include "CDUtils.h"
|
||||||
#include "LogWindow.h"
|
#include "LogWindow.h"
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// A shortcut to access the bitmaps
|
// A shortcut to access the bitmaps
|
||||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
@ -216,6 +215,7 @@ class CFrame : public wxFrame
|
|||||||
void OnHostMessage(wxCommandEvent& event);
|
void OnHostMessage(wxCommandEvent& event);
|
||||||
|
|
||||||
void OnMemcard(wxCommandEvent& event); // Misc
|
void OnMemcard(wxCommandEvent& event); // Misc
|
||||||
|
|
||||||
void OnShow_CheatsWindow(wxCommandEvent& event);
|
void OnShow_CheatsWindow(wxCommandEvent& event);
|
||||||
void OnShow_SDCardWindow(wxCommandEvent& event);
|
void OnShow_SDCardWindow(wxCommandEvent& event);
|
||||||
void OnLoadWiiMenu(wxCommandEvent& event);
|
void OnLoadWiiMenu(wxCommandEvent& event);
|
||||||
@ -234,6 +234,7 @@ class CFrame : public wxFrame
|
|||||||
wxMenuItem* m_pPluginOptions;
|
wxMenuItem* m_pPluginOptions;
|
||||||
wxMenuItem* m_pMenuItemLoad;
|
wxMenuItem* m_pMenuItemLoad;
|
||||||
wxMenuItem* m_pMenuItemSave;
|
wxMenuItem* m_pMenuItemSave;
|
||||||
|
wxMenuItem* m_pMenuBootWii;
|
||||||
wxToolBarToolBase* m_pToolPlay;
|
wxToolBarToolBase* m_pToolPlay;
|
||||||
|
|
||||||
void BootGame();
|
void BootGame();
|
||||||
|
@ -167,7 +167,7 @@ void CFrame::CreateMenu()
|
|||||||
|
|
||||||
if (DiscIO::CNANDContentManager::Access().GetNANDLoader(FULL_WII_MENU_DIR).IsValid())
|
if (DiscIO::CNANDContentManager::Access().GetNANDLoader(FULL_WII_MENU_DIR).IsValid())
|
||||||
{
|
{
|
||||||
toolsMenu->Append(IDM_LOAD_WII_MENU, _T("Load Wii Menu"));
|
m_pMenuBootWii = toolsMenu->Append(IDM_LOAD_WII_MENU, _T("Load Wii Menu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pMenuBar->Append(toolsMenu, _T("&Tools"));
|
m_pMenuBar->Append(toolsMenu, _T("&Tools"));
|
||||||
@ -837,6 +837,7 @@ void CFrame::UpdateGUI()
|
|||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
m_pMenuChangeDisc->Enable(initialized);
|
m_pMenuChangeDisc->Enable(initialized);
|
||||||
|
m_pMenuBootWii->Enable(!initialized);
|
||||||
|
|
||||||
if (running)
|
if (running)
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "ConfigManager.h"
|
#include "ConfigManager.h"
|
||||||
#include "GameListCtrl.h"
|
#include "GameListCtrl.h"
|
||||||
#include "Blob.h"
|
#include "Blob.h"
|
||||||
|
#include "Core.h"
|
||||||
#include "ISOProperties.h"
|
#include "ISOProperties.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
@ -151,12 +152,19 @@ void CGameListCtrl::BrowseForDirectory()
|
|||||||
|
|
||||||
void CGameListCtrl::Update()
|
void CGameListCtrl::Update()
|
||||||
{
|
{
|
||||||
|
// Don't let the user refresh it while the a game is running
|
||||||
|
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||||
|
return;
|
||||||
if (m_imageListSmall)
|
if (m_imageListSmall)
|
||||||
{
|
{
|
||||||
delete m_imageListSmall;
|
delete m_imageListSmall;
|
||||||
m_imageListSmall = NULL;
|
m_imageListSmall = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NetPlay : Set/Reset the GameList string
|
||||||
|
m_gameList.clear();
|
||||||
|
m_gamePath.clear();
|
||||||
|
|
||||||
Hide();
|
Hide();
|
||||||
|
|
||||||
ScanForISOs();
|
ScanForISOs();
|
||||||
@ -233,6 +241,15 @@ wxString NiceSizeFormat(s64 _size)
|
|||||||
return(NiceString);
|
return(NiceString);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string CGameListCtrl::GetGamePaths() const
|
||||||
|
{
|
||||||
|
return m_gamePath;
|
||||||
|
}
|
||||||
|
std::string CGameListCtrl::GetGameNames() const
|
||||||
|
{
|
||||||
|
return m_gameList;
|
||||||
|
}
|
||||||
|
|
||||||
void CGameListCtrl::InsertItemInReportView(long _Index)
|
void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||||
{
|
{
|
||||||
// When using wxListCtrl, there is no hope of per-column text colors.
|
// When using wxListCtrl, there is no hope of per-column text colors.
|
||||||
@ -240,7 +257,9 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
|||||||
// title: 0xFF0000
|
// title: 0xFF0000
|
||||||
// company: 0x007030
|
// company: 0x007030
|
||||||
|
|
||||||
|
wxString name, description;
|
||||||
GameListItem& rISOFile = m_ISOFiles[_Index];
|
GameListItem& rISOFile = m_ISOFiles[_Index];
|
||||||
|
m_gamePath.append(std::string(rISOFile.GetFileName()) + '\n');
|
||||||
|
|
||||||
int ImageIndex = -1;
|
int ImageIndex = -1;
|
||||||
|
|
||||||
@ -255,38 +274,36 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
|||||||
switch (rISOFile.GetCountry())
|
switch (rISOFile.GetCountry())
|
||||||
{
|
{
|
||||||
case DiscIO::IVolume::COUNTRY_JAP:
|
case DiscIO::IVolume::COUNTRY_JAP:
|
||||||
{
|
|
||||||
// keep these codes, when we move to wx unicode...
|
// keep these codes, when we move to wx unicode...
|
||||||
//wxCSConv convFrom(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
//wxCSConv convFrom(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
||||||
//wxCSConv convTo(wxFontMapper::GetEncodingName(wxFONTENCODING_DEFAULT));
|
//wxCSConv convTo(wxFontMapper::GetEncodingName(wxFONTENCODING_DEFAULT));
|
||||||
//SetItem(_Index, COLUMN_TITLE, wxString(wxString(rISOFile.GetName()).wc_str(convFrom) , convTo), -1);
|
//SetItem(_Index, COLUMN_TITLE, wxString(wxString(rISOFile.GetName()).wc_str(convFrom) , convTo), -1);
|
||||||
//SetItem(_Index, COLUMN_NOTES, wxString(wxString(rISOFile.GetDescription()).wc_str(convFrom) , convTo), -1);
|
//SetItem(_Index, COLUMN_NOTES, wxString(wxString(rISOFile.GetDescription()).wc_str(convFrom) , convTo), -1);
|
||||||
wxString name;
|
|
||||||
if (CopySJISToString(name, rISOFile.GetName(0).c_str()))
|
if (CopySJISToString(name, rISOFile.GetName(0).c_str()))
|
||||||
{
|
|
||||||
SetItem(_Index, COLUMN_TITLE, name, -1);
|
SetItem(_Index, COLUMN_TITLE, name, -1);
|
||||||
}
|
|
||||||
|
|
||||||
wxString description;
|
|
||||||
if (CopySJISToString(description, rISOFile.GetDescription(0).c_str()))
|
if (CopySJISToString(description, rISOFile.GetDescription(0).c_str()))
|
||||||
{
|
|
||||||
SetItem(_Index, COLUMN_NOTES, description, -1);
|
SetItem(_Index, COLUMN_NOTES, description, -1);
|
||||||
}
|
|
||||||
}
|
// NetPLay string
|
||||||
|
m_gameList.append(std::string(name) + " (J)\n");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case DiscIO::IVolume::COUNTRY_USA:
|
case DiscIO::IVolume::COUNTRY_USA:
|
||||||
|
m_gameList.append(std::string(wxString::From8BitData(rISOFile.GetName(0).c_str())) + " (U)\n");
|
||||||
SetItem(_Index, COLUMN_TITLE, wxString::From8BitData(rISOFile.GetName(0).c_str()), -1);
|
SetItem(_Index, COLUMN_TITLE, wxString::From8BitData(rISOFile.GetName(0).c_str()), -1);
|
||||||
SetItem(_Index, COLUMN_NOTES, wxString::From8BitData(rISOFile.GetDescription(0).c_str()), -1);
|
SetItem(_Index, COLUMN_NOTES, wxString::From8BitData(rISOFile.GetDescription(0).c_str()), -1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
m_gameList.append(std::string(wxString::From8BitData(
|
||||||
|
rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()))+ " (E)\n");
|
||||||
SetItem(_Index, COLUMN_TITLE,
|
SetItem(_Index, COLUMN_TITLE,
|
||||||
wxString::From8BitData(rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
wxString::From8BitData(rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||||
SetItem(_Index, COLUMN_NOTES,
|
SetItem(_Index, COLUMN_NOTES,
|
||||||
wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SetItem(_Index, COLUMN_COMPANY, wxString::From8BitData(rISOFile.GetCompany().c_str()), -1);
|
|
||||||
|
|
||||||
|
SetItem(_Index, COLUMN_COMPANY, wxString::From8BitData(rISOFile.GetCompany().c_str()), -1);
|
||||||
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
SetItem(_Index, COLUMN_SIZE, NiceSizeFormat(rISOFile.GetFileSize()), -1);
|
||||||
|
|
||||||
// Load the INI file for columns that read from it
|
// Load the INI file for columns that read from it
|
||||||
|
@ -32,6 +32,11 @@ public:
|
|||||||
~CGameListCtrl();
|
~CGameListCtrl();
|
||||||
|
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
|
// Net Play method
|
||||||
|
std::string GetGamePaths() const;
|
||||||
|
std::string GetGameNames() const;
|
||||||
|
|
||||||
void BrowseForDirectory();
|
void BrowseForDirectory();
|
||||||
const GameListItem *GetSelectedISO();
|
const GameListItem *GetSelectedISO();
|
||||||
const GameListItem *GetISO(int index) const;
|
const GameListItem *GetISO(int index) const;
|
||||||
@ -53,6 +58,10 @@ private:
|
|||||||
std::vector<int> m_FlagImageIndex;
|
std::vector<int> m_FlagImageIndex;
|
||||||
std::vector<GameListItem> m_ISOFiles;
|
std::vector<GameListItem> m_ISOFiles;
|
||||||
|
|
||||||
|
// NetPlay string for the gamelist
|
||||||
|
std::string m_gameList;
|
||||||
|
std::string m_gamePath;
|
||||||
|
|
||||||
int last_column;
|
int last_column;
|
||||||
int last_sort;
|
int last_sort;
|
||||||
|
|
||||||
|
@ -82,16 +82,8 @@ void Pad_Use_Rumble(u8 _numPAD)//, SPADStatus* _pPADStatus)
|
|||||||
|
|
||||||
if (PadMapping[_numPAD].rumble) {
|
if (PadMapping[_numPAD].rumble) {
|
||||||
if (!g_Rumble) {
|
if (!g_Rumble) {
|
||||||
|
// GetForegroundWindow() always sends the good HWND
|
||||||
HWND rumble_hWnd = GetParent(m_hWnd);
|
if (FAILED(InitRumble(GetForegroundWindow())))
|
||||||
HWND TopLevel = GetParent(rumble_hWnd);
|
|
||||||
|
|
||||||
// Support both rendering to main window and not.
|
|
||||||
if (GetForegroundWindow() == TopLevel)
|
|
||||||
rumble_hWnd = TopLevel;
|
|
||||||
if (GetForegroundWindow() == m_hWnd)
|
|
||||||
rumble_hWnd = m_hWnd;
|
|
||||||
if (FAILED(InitRumble(rumble_hWnd)))
|
|
||||||
PanicAlert("Could not initialize Rumble!");
|
PanicAlert("Could not initialize Rumble!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user