mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07: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:
parent
66ca49d3b8
commit
c857f71e80
@ -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
|
||||
// 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
|
||||
// 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);
|
||||
|
||||
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sISOButtons->Add(RecersiveISOPath, 0, wxALL, 0);
|
||||
sISOButtons->Add(RecersiveISOPath, 0, wxALL|wxALIGN_CENTER, 0);
|
||||
sISOButtons->AddStretchSpacer(1);
|
||||
sISOButtons->Add(AddISOPath, 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
|
||||
// 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_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote)
|
||||
|
||||
|
||||
#ifdef MUSICMOD
|
||||
EVT_MENU(IDM_MUTE, CFrame::MM_OnMute)
|
||||
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)
|
||||
#endif
|
||||
|
||||
EVT_MENU(IDM_NETPLAY, CFrame::OnNetPlay)
|
||||
EVT_MENU(IDM_BROWSE, CFrame::OnBrowse)
|
||||
EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard)
|
||||
EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow)
|
||||
@ -430,7 +430,8 @@ void CFrame::OnQuit(wxCommandEvent& WXUNUSED (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();
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
|
@ -29,7 +29,6 @@
|
||||
////////////////////////////////
|
||||
#include "CDUtils.h"
|
||||
#include "LogWindow.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// A shortcut to access the bitmaps
|
||||
// ¯¯¯¯¯¯¯¯¯¯
|
||||
@ -216,6 +215,7 @@ class CFrame : public wxFrame
|
||||
void OnHostMessage(wxCommandEvent& event);
|
||||
|
||||
void OnMemcard(wxCommandEvent& event); // Misc
|
||||
|
||||
void OnShow_CheatsWindow(wxCommandEvent& event);
|
||||
void OnShow_SDCardWindow(wxCommandEvent& event);
|
||||
void OnLoadWiiMenu(wxCommandEvent& event);
|
||||
@ -234,6 +234,7 @@ class CFrame : public wxFrame
|
||||
wxMenuItem* m_pPluginOptions;
|
||||
wxMenuItem* m_pMenuItemLoad;
|
||||
wxMenuItem* m_pMenuItemSave;
|
||||
wxMenuItem* m_pMenuBootWii;
|
||||
wxToolBarToolBase* m_pToolPlay;
|
||||
|
||||
void BootGame();
|
||||
|
@ -167,7 +167,7 @@ void CFrame::CreateMenu()
|
||||
|
||||
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"));
|
||||
@ -837,6 +837,7 @@ void CFrame::UpdateGUI()
|
||||
|
||||
// Misc
|
||||
m_pMenuChangeDisc->Enable(initialized);
|
||||
m_pMenuBootWii->Enable(!initialized);
|
||||
|
||||
if (running)
|
||||
{
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "ConfigManager.h"
|
||||
#include "GameListCtrl.h"
|
||||
#include "Blob.h"
|
||||
#include "Core.h"
|
||||
#include "ISOProperties.h"
|
||||
#include "IniFile.h"
|
||||
#include "FileUtil.h"
|
||||
@ -151,12 +152,19 @@ void CGameListCtrl::BrowseForDirectory()
|
||||
|
||||
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)
|
||||
{
|
||||
delete m_imageListSmall;
|
||||
m_imageListSmall = NULL;
|
||||
}
|
||||
|
||||
// NetPlay : Set/Reset the GameList string
|
||||
m_gameList.clear();
|
||||
m_gamePath.clear();
|
||||
|
||||
Hide();
|
||||
|
||||
ScanForISOs();
|
||||
@ -233,6 +241,15 @@ wxString NiceSizeFormat(s64 _size)
|
||||
return(NiceString);
|
||||
}
|
||||
|
||||
std::string CGameListCtrl::GetGamePaths() const
|
||||
{
|
||||
return m_gamePath;
|
||||
}
|
||||
std::string CGameListCtrl::GetGameNames() const
|
||||
{
|
||||
return m_gameList;
|
||||
}
|
||||
|
||||
void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
{
|
||||
// When using wxListCtrl, there is no hope of per-column text colors.
|
||||
@ -240,7 +257,9 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
// title: 0xFF0000
|
||||
// company: 0x007030
|
||||
|
||||
wxString name, description;
|
||||
GameListItem& rISOFile = m_ISOFiles[_Index];
|
||||
m_gamePath.append(std::string(rISOFile.GetFileName()) + '\n');
|
||||
|
||||
int ImageIndex = -1;
|
||||
|
||||
@ -255,38 +274,36 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
switch (rISOFile.GetCountry())
|
||||
{
|
||||
case DiscIO::IVolume::COUNTRY_JAP:
|
||||
{
|
||||
// keep these codes, when we move to wx unicode...
|
||||
//wxCSConv convFrom(wxFontMapper::GetEncodingName(wxFONTENCODING_SHIFT_JIS));
|
||||
//wxCSConv convTo(wxFontMapper::GetEncodingName(wxFONTENCODING_DEFAULT));
|
||||
//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);
|
||||
wxString name;
|
||||
if (CopySJISToString(name, rISOFile.GetName(0).c_str()))
|
||||
{
|
||||
SetItem(_Index, COLUMN_TITLE, name, -1);
|
||||
}
|
||||
|
||||
wxString description;
|
||||
if (CopySJISToString(description, rISOFile.GetDescription(0).c_str()))
|
||||
{
|
||||
SetItem(_Index, COLUMN_NOTES, description, -1);
|
||||
}
|
||||
}
|
||||
|
||||
// NetPLay string
|
||||
m_gameList.append(std::string(name) + " (J)\n");
|
||||
|
||||
break;
|
||||
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_NOTES, wxString::From8BitData(rISOFile.GetDescription(0).c_str()), -1);
|
||||
break;
|
||||
default:
|
||||
m_gameList.append(std::string(wxString::From8BitData(
|
||||
rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()))+ " (E)\n");
|
||||
SetItem(_Index, COLUMN_TITLE,
|
||||
wxString::From8BitData(rISOFile.GetName((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||
SetItem(_Index, COLUMN_NOTES,
|
||||
wxString::From8BitData(rISOFile.GetDescription((int)SConfig::GetInstance().m_InterfaceLanguage).c_str()), -1);
|
||||
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);
|
||||
|
||||
// Load the INI file for columns that read from it
|
||||
|
@ -32,6 +32,11 @@ public:
|
||||
~CGameListCtrl();
|
||||
|
||||
void Update();
|
||||
|
||||
// Net Play method
|
||||
std::string GetGamePaths() const;
|
||||
std::string GetGameNames() const;
|
||||
|
||||
void BrowseForDirectory();
|
||||
const GameListItem *GetSelectedISO();
|
||||
const GameListItem *GetISO(int index) const;
|
||||
@ -53,6 +58,10 @@ private:
|
||||
std::vector<int> m_FlagImageIndex;
|
||||
std::vector<GameListItem> m_ISOFiles;
|
||||
|
||||
// NetPlay string for the gamelist
|
||||
std::string m_gameList;
|
||||
std::string m_gamePath;
|
||||
|
||||
int last_column;
|
||||
int last_sort;
|
||||
|
||||
|
@ -82,16 +82,8 @@ void Pad_Use_Rumble(u8 _numPAD)//, SPADStatus* _pPADStatus)
|
||||
|
||||
if (PadMapping[_numPAD].rumble) {
|
||||
if (!g_Rumble) {
|
||||
|
||||
HWND rumble_hWnd = GetParent(m_hWnd);
|
||||
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)))
|
||||
// GetForegroundWindow() always sends the good HWND
|
||||
if (FAILED(InitRumble(GetForegroundWindow())))
|
||||
PanicAlert("Could not initialize Rumble!");
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user