Merge branch 'master' into real-wiimote-scanning
Conflicts: Source/Core/Core/Src/HW/WiimoteReal/IOWin.cpp Source/Core/Core/Src/HW/WiimoteReal/WiimoteReal.cpp
This commit is contained in:
@@ -17,10 +17,12 @@
|
||||
|
||||
#include <string> // System
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <wx/spinbutt.h>
|
||||
|
||||
#include "Common.h"
|
||||
#include "CommonPaths.h"
|
||||
#include "FileSearch.h"
|
||||
|
||||
#include "Core.h" // Core
|
||||
#include "HW/EXI.h"
|
||||
@@ -40,6 +42,14 @@
|
||||
#include "Main.h"
|
||||
#include "VideoBackendBase.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <tr1/functional>
|
||||
using std::tr1::function;
|
||||
#else
|
||||
#include <functional>
|
||||
using std::function;
|
||||
#endif
|
||||
|
||||
#define TEXT_BOX(page, text) new wxStaticText(page, wxID_ANY, text, wxDefaultPosition, wxDefaultSize)
|
||||
|
||||
extern CFrame* main_frame;
|
||||
@@ -126,7 +136,6 @@ EVT_SLIDER(ID_VOLUME, CConfigMain::AudioSettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_CONFIRMSTOP, CConfigMain::DisplaySettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_USEPANICHANDLERS, CConfigMain::DisplaySettingsChanged)
|
||||
EVT_CHECKBOX(ID_INTERFACE_ONSCREENDISPLAYMESSAGES, CConfigMain::DisplaySettingsChanged)
|
||||
EVT_CHOICE(ID_INTERFACE_THEME, CConfigMain::DisplaySettingsChanged)
|
||||
EVT_CHOICE(ID_INTERFACE_LANG, CConfigMain::DisplaySettingsChanged)
|
||||
EVT_BUTTON(ID_HOTKEY_CONFIG, CConfigMain::DisplaySettingsChanged)
|
||||
|
||||
@@ -253,14 +262,6 @@ void CConfigMain::InitializeGUILists()
|
||||
arrayStringFor_DSPEngine.Add(_("DSP LLE recompiler"));
|
||||
arrayStringFor_DSPEngine.Add(_("DSP LLE interpreter (slow)"));
|
||||
|
||||
|
||||
// Display page
|
||||
// Themes
|
||||
arrayStringFor_Themes.Add(wxT("Boomy"));
|
||||
arrayStringFor_Themes.Add(wxT("Vista"));
|
||||
arrayStringFor_Themes.Add(wxT("X-Plastik"));
|
||||
arrayStringFor_Themes.Add(wxT("KDE"));
|
||||
|
||||
// Gamecube page
|
||||
// GC Language arrayStrings
|
||||
arrayStringFor_GCSystemLang.Add(_("English"));
|
||||
@@ -320,9 +321,6 @@ void CConfigMain::InitializeGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
// Load DSP Settings.
|
||||
ac_Config.Load();
|
||||
|
||||
// General - Basic
|
||||
CPUThread->SetValue(startup_params.bCPUThread);
|
||||
SkipIdle->SetValue(startup_params.bSkipIdle);
|
||||
@@ -339,7 +337,6 @@ void CConfigMain::InitializeGUIValues()
|
||||
ConfirmStop->SetValue(startup_params.bConfirmStop);
|
||||
UsePanicHandlers->SetValue(startup_params.bUsePanicHandlers);
|
||||
OnScreenDisplayMessages->SetValue(startup_params.bOnScreenDisplayMessages);
|
||||
Theme->SetSelection(startup_params.iTheme);
|
||||
// need redesign
|
||||
for (unsigned int i = 0; i < sizeof(langIds) / sizeof(wxLanguage); i++)
|
||||
{
|
||||
@@ -354,17 +351,17 @@ void CConfigMain::InitializeGUIValues()
|
||||
if (startup_params.bDSPHLE)
|
||||
DSPEngine->SetSelection(0);
|
||||
else
|
||||
DSPEngine->SetSelection(ac_Config.m_EnableJIT ? 1 : 2);
|
||||
DSPEngine->SetSelection(SConfig::GetInstance().m_EnableJIT ? 1 : 2);
|
||||
|
||||
// Audio
|
||||
VolumeSlider->Enable(SupportsVolumeChanges(ac_Config.sBackend));
|
||||
VolumeSlider->SetValue(ac_Config.m_Volume);
|
||||
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), ac_Config.m_Volume));
|
||||
VolumeSlider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend));
|
||||
VolumeSlider->SetValue(SConfig::GetInstance().m_Volume);
|
||||
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), SConfig::GetInstance().m_Volume));
|
||||
DSPThread->SetValue(startup_params.bDSPThread);
|
||||
DumpAudio->SetValue(ac_Config.m_DumpAudio ? true : false);
|
||||
DPL2Decoder->Enable(std::string(ac_Config.sBackend) == BACKEND_OPENAL);
|
||||
DumpAudio->SetValue(SConfig::GetInstance().m_DumpAudio ? true : false);
|
||||
DPL2Decoder->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL);
|
||||
DPL2Decoder->SetValue(startup_params.bDPL2Decoder);
|
||||
Latency->Enable(std::string(ac_Config.sBackend) == BACKEND_OPENAL);
|
||||
Latency->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL);
|
||||
Latency->SetValue(startup_params.iLatency);
|
||||
// add backends to the list
|
||||
AddAudioBackends();
|
||||
@@ -497,12 +494,9 @@ void CConfigMain::InitializeGUITooltips()
|
||||
|
||||
// Display - Interface
|
||||
ConfirmStop->SetToolTip(_("Show a confirmation box before stopping a game."));
|
||||
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occured.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
||||
UsePanicHandlers->SetToolTip(_("Show a message box when a potentially serious error has occurred.\nDisabling this may avoid annoying and non-fatal messages, but it may also mean that Dolphin suddenly crashes without any explanation at all."));
|
||||
OnScreenDisplayMessages->SetToolTip(_("Show messages on the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
|
||||
|
||||
// Display - Themes: Copyright notice
|
||||
Theme->SetToolTip(_("Boomy: Milosz Wlazlo [[email protected]]\nVista: VistaIcons.com\nX-Plastik: black_rider [ForumW.org]\nKDE: KDE-Look.org"));
|
||||
|
||||
InterfaceLang->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
|
||||
|
||||
// Audio tooltips
|
||||
@@ -584,9 +578,6 @@ void CConfigMain::CreateGUIControls()
|
||||
// Hotkey configuration
|
||||
HotkeyConfig = new wxButton(DisplayPage, ID_HOTKEY_CONFIG, _("Hotkeys"),
|
||||
wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT, wxDefaultValidator);
|
||||
// Themes
|
||||
Theme = new wxChoice(DisplayPage, ID_INTERFACE_THEME, wxDefaultPosition,
|
||||
wxDefaultSize, arrayStringFor_Themes, 0, wxDefaultValidator);
|
||||
// Interface settings
|
||||
ConfirmStop = new wxCheckBox(DisplayPage, ID_INTERFACE_CONFIRMSTOP, _("Confirm on Stop"),
|
||||
wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||
@@ -600,10 +591,42 @@ void CConfigMain::CreateGUIControls()
|
||||
sInterface->Add(InterfaceLang, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sInterface->AddStretchSpacer();
|
||||
sInterface->Add(HotkeyConfig, 0, wxALIGN_RIGHT | wxALL, 5);
|
||||
wxBoxSizer* scInterface = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
// theme selection
|
||||
auto const theme_selection = new wxChoice(DisplayPage, wxID_ANY);
|
||||
|
||||
CFileSearch::XStringVector theme_dirs;
|
||||
theme_dirs.push_back(File::GetUserPath(D_THEMES_IDX));
|
||||
#if !defined(_WIN32)
|
||||
theme_dirs.push_back(SHARED_USER_DIR THEMES_DIR);
|
||||
#endif
|
||||
|
||||
CFileSearch cfs(CFileSearch::XStringVector(1, "*"), theme_dirs);
|
||||
auto const& sv = cfs.GetFileNames();
|
||||
std::for_each(sv.begin(), sv.end(), [theme_selection](const std::string& filename)
|
||||
{
|
||||
std::string name, ext;
|
||||
SplitPath(filename, NULL, &name, &ext);
|
||||
|
||||
name += ext;
|
||||
if (-1 == theme_selection->FindString(name))
|
||||
theme_selection->Append(name);
|
||||
});
|
||||
|
||||
theme_selection->SetStringSelection(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name);
|
||||
|
||||
// std::function = avoid error on msvc
|
||||
theme_selection->Bind(wxEVT_COMMAND_CHOICE_SELECTED, function<void(wxEvent&)>([theme_selection](wxEvent&)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = theme_selection->GetStringSelection();
|
||||
main_frame->InitBitmaps();
|
||||
}));
|
||||
|
||||
auto const scInterface = new wxBoxSizer(wxHORIZONTAL);
|
||||
scInterface->Add(TEXT_BOX(DisplayPage, _("Theme:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
scInterface->Add(Theme, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
scInterface->Add(theme_selection, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
scInterface->AddStretchSpacer();
|
||||
|
||||
sbInterface = new wxStaticBoxSizer(wxVERTICAL, DisplayPage, _("Interface Settings"));
|
||||
sbInterface->Add(ConfirmStop, 0, wxALL, 5);
|
||||
sbInterface->Add(UsePanicHandlers, 0, wxALL, 5);
|
||||
@@ -838,9 +861,6 @@ void CConfigMain::OnOk(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
// Save the config. Dolphin crashes to often to save the settings on closing only
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
|
||||
// Save Audio settings
|
||||
ac_Config.SaveSettings();
|
||||
}
|
||||
|
||||
// Core settings
|
||||
@@ -860,7 +880,7 @@ void CConfigMain::CoreSettingsChanged(wxCommandEvent& event)
|
||||
break;
|
||||
case ID_FRAMELIMIT:
|
||||
SConfig::GetInstance().m_Framelimit = Framelimit->GetSelection();
|
||||
ac_Config.Update();
|
||||
AudioCommon::UpdateSoundStream();
|
||||
break;
|
||||
case ID_FRAMELIMIT_USEFPSFORLIMITING:
|
||||
SConfig::GetInstance().b_UseFPS = UseFPSForLimiting->IsChecked();
|
||||
@@ -895,10 +915,6 @@ void CConfigMain::DisplaySettingsChanged(wxCommandEvent& event)
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = OnScreenDisplayMessages->IsChecked();
|
||||
SetEnableAlert(OnScreenDisplayMessages->IsChecked());
|
||||
break;
|
||||
case ID_INTERFACE_THEME:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme = Theme->GetSelection();
|
||||
main_frame->InitBitmaps();
|
||||
break;
|
||||
case ID_INTERFACE_LANG:
|
||||
if (SConfig::GetInstance().m_InterfaceLanguage != langIds[InterfaceLang->GetSelection()])
|
||||
SuccessAlertT("You must restart Dolphin in order for the change to take effect.");
|
||||
@@ -922,13 +938,13 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
||||
case ID_DSPENGINE:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = DSPEngine->GetSelection() == 0;
|
||||
if (!DSPEngine->GetSelection() == 0)
|
||||
ac_Config.m_EnableJIT = DSPEngine->GetSelection() == 1;
|
||||
ac_Config.Update();
|
||||
SConfig::GetInstance().m_EnableJIT = DSPEngine->GetSelection() == 1;
|
||||
AudioCommon::UpdateSoundStream();
|
||||
break;
|
||||
|
||||
case ID_VOLUME:
|
||||
ac_Config.m_Volume = VolumeSlider->GetValue();
|
||||
ac_Config.Update();
|
||||
SConfig::GetInstance().m_Volume = VolumeSlider->GetValue();
|
||||
AudioCommon::UpdateSoundStream();
|
||||
VolumeText->SetLabel(wxString::Format(wxT("%d %%"), VolumeSlider->GetValue()));
|
||||
break;
|
||||
|
||||
@@ -944,8 +960,8 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
||||
VolumeSlider->Enable(SupportsVolumeChanges(std::string(BackendSelection->GetStringSelection().mb_str())));
|
||||
Latency->Enable(std::string(BackendSelection->GetStringSelection().mb_str()) == BACKEND_OPENAL);
|
||||
DPL2Decoder->Enable(std::string(BackendSelection->GetStringSelection().mb_str()) == BACKEND_OPENAL);
|
||||
ac_Config.sBackend = BackendSelection->GetStringSelection().mb_str();
|
||||
ac_Config.Update();
|
||||
SConfig::GetInstance().sBackend = BackendSelection->GetStringSelection().mb_str();
|
||||
AudioCommon::UpdateSoundStream();
|
||||
break;
|
||||
|
||||
case ID_LATENCY:
|
||||
@@ -953,7 +969,7 @@ void CConfigMain::AudioSettingsChanged(wxCommandEvent& event)
|
||||
break;
|
||||
|
||||
default:
|
||||
ac_Config.m_DumpAudio = DumpAudio->GetValue();
|
||||
SConfig::GetInstance().m_DumpAudio = DumpAudio->GetValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -967,7 +983,7 @@ void CConfigMain::AddAudioBackends()
|
||||
{
|
||||
BackendSelection->Append(wxString::FromAscii((*iter).c_str()));
|
||||
int num = BackendSelection->\
|
||||
FindString(wxString::FromAscii(ac_Config.sBackend.c_str()));
|
||||
FindString(wxString::FromAscii(SConfig::GetInstance().sBackend.c_str()));
|
||||
BackendSelection->SetSelection(num);
|
||||
}
|
||||
}
|
||||
@@ -1048,6 +1064,13 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
if (!strncmp(File::GetExeDirectory().c_str(), filename.c_str(), File::GetExeDirectory().size()))
|
||||
{
|
||||
filename.erase(0, File::GetExeDirectory().size() +1);
|
||||
filename = "./" + filename;
|
||||
}
|
||||
#endif
|
||||
|
||||
// also check that the path isn't used for the other memcard...
|
||||
if (filename.compare(isSlotA ? SConfig::GetInstance().m_strMemoryCardB
|
||||
|
||||
@@ -87,7 +87,6 @@ private:
|
||||
ID_INTERFACE_CONFIRMSTOP,
|
||||
ID_INTERFACE_USEPANICHANDLERS,
|
||||
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
|
||||
ID_INTERFACE_THEME,
|
||||
ID_INTERFACE_LANG,
|
||||
ID_HOTKEY_CONFIG,
|
||||
|
||||
@@ -165,7 +164,6 @@ private:
|
||||
wxCheckBox* ConfirmStop;
|
||||
wxCheckBox* UsePanicHandlers;
|
||||
wxCheckBox* OnScreenDisplayMessages;
|
||||
wxChoice* Theme;
|
||||
wxChoice* InterfaceLang;
|
||||
wxButton* HotkeyConfig;
|
||||
|
||||
@@ -227,7 +225,6 @@ private:
|
||||
wxArrayString arrayStringFor_CPUEngine;
|
||||
wxArrayString arrayStringFor_DSPEngine;
|
||||
wxArrayString arrayStringFor_FullscreenResolution;
|
||||
wxArrayString arrayStringFor_Themes;
|
||||
wxArrayString arrayStringFor_InterfaceLang;
|
||||
wxArrayString arrayStringFor_GCSystemLang;
|
||||
wxArrayString arrayStringFor_WiiSensBarPos;
|
||||
|
||||
@@ -52,10 +52,7 @@
|
||||
|
||||
extern "C" // Bitmaps
|
||||
{
|
||||
#include "../../resources/toolbar_play.c"
|
||||
#include "../../resources/toolbar_pause.c"
|
||||
#include "../../resources/toolbar_add_memorycheck.c"
|
||||
#include "../../resources/toolbar_debugger_delete.c"
|
||||
#include "../../resources/toolbar_add_breakpoint.c"
|
||||
}
|
||||
|
||||
@@ -563,23 +560,21 @@ bool CCodeWindow::JITBlockLinking()
|
||||
void CCodeWindow::InitBitmaps()
|
||||
{
|
||||
// load original size 48x48
|
||||
m_Bitmaps[Toolbar_DebugGo] = wxGetBitmapFromMemory(toolbar_play_png);
|
||||
m_Bitmaps[Toolbar_Step] = wxGetBitmapFromMemory(toolbar_add_breakpoint_png);
|
||||
m_Bitmaps[Toolbar_StepOver] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_Skip] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_GotoPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_SetPC] = wxGetBitmapFromMemory(toolbar_add_memcheck_png);
|
||||
m_Bitmaps[Toolbar_DebugPause] = wxGetBitmapFromMemory(toolbar_pause_png);
|
||||
|
||||
// scale to 24x24 for toolbar
|
||||
for (size_t n = Toolbar_DebugGo; n < ToolbarDebugBitmapMax; n++)
|
||||
for (size_t n = 0; n < ToolbarDebugBitmapMax; n++)
|
||||
m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(24, 24));
|
||||
}
|
||||
|
||||
void CCodeWindow::PopulateToolbar(wxAuiToolBar* toolBar)
|
||||
{
|
||||
int w = m_Bitmaps[Toolbar_DebugGo].GetWidth(),
|
||||
h = m_Bitmaps[Toolbar_DebugGo].GetHeight();
|
||||
int w = m_Bitmaps[0].GetWidth(),
|
||||
h = m_Bitmaps[0].GetHeight();
|
||||
|
||||
toolBar->SetToolBitmapSize(wxSize(w, h));
|
||||
toolBar->AddTool(IDM_STEP, _("Step"), m_Bitmaps[Toolbar_Step]);
|
||||
|
||||
@@ -54,15 +54,6 @@
|
||||
|
||||
#include "ConfigManager.h"
|
||||
|
||||
extern "C" // Bitmaps
|
||||
{
|
||||
#include "../../resources/toolbar_play.c"
|
||||
#include "../../resources/toolbar_pause.c"
|
||||
#include "../../resources/toolbar_add_memorycheck.c"
|
||||
#include "../../resources/toolbar_debugger_delete.c"
|
||||
#include "../../resources/toolbar_add_breakpoint.c"
|
||||
}
|
||||
|
||||
// Save and load settings
|
||||
// -----------------------------
|
||||
void CCodeWindow::Load()
|
||||
|
||||
@@ -483,8 +483,7 @@ void FifoPlayerDlg::OnBeginSearch(wxCommandEvent& event)
|
||||
SearchResult result;
|
||||
result.frame_idx = frame_idx;
|
||||
|
||||
int obj_idx = m_objectsList->GetSelection();
|
||||
result.obj_idx = obj_idx;
|
||||
result.obj_idx = m_objectsList->GetSelection();
|
||||
result.cmd_idx = 0;
|
||||
for (unsigned int cmd_idx = 1; cmd_idx < m_objectCmdOffsets.size(); ++cmd_idx)
|
||||
{
|
||||
@@ -642,8 +641,8 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
|
||||
{
|
||||
m_objectCmdOffsets.push_back(objectdata - objectdata_start);
|
||||
int new_offset = objectdata - &fifo_frame.fifoData[frame.objectStarts[0]];
|
||||
int cmd = *objectdata++;
|
||||
switch (cmd)
|
||||
int command = *objectdata++;
|
||||
switch (command)
|
||||
{
|
||||
case GX_NOP:
|
||||
newLabel = _("NOP");
|
||||
@@ -691,9 +690,9 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
|
||||
case GX_LOAD_INDX_C:
|
||||
case GX_LOAD_INDX_D:
|
||||
objectdata += 4;
|
||||
newLabel = wxString::Format(wxT("LOAD INDX %s"), (cmd == GX_LOAD_INDX_A) ? _("A") :
|
||||
(cmd == GX_LOAD_INDX_B) ? _("B") :
|
||||
(cmd == GX_LOAD_INDX_C) ? _("C") : _("D"));
|
||||
newLabel = wxString::Format(wxT("LOAD INDX %s"), (command == GX_LOAD_INDX_A) ? _("A") :
|
||||
(command == GX_LOAD_INDX_B) ? _("B") :
|
||||
(command == GX_LOAD_INDX_C) ? _("C") : _("D"));
|
||||
break;
|
||||
|
||||
case GX_CMD_CALL_DL:
|
||||
|
||||
@@ -52,22 +52,6 @@
|
||||
|
||||
extern "C" {
|
||||
#include "../resources/Dolphin.c" // Dolphin icon
|
||||
#include "../resources/toolbar_browse.c"
|
||||
#include "../resources/toolbar_file_open.c"
|
||||
#include "../resources/toolbar_fullscreen.c"
|
||||
#include "../resources/toolbar_help.c"
|
||||
#include "../resources/toolbar_pause.c"
|
||||
#include "../resources/toolbar_play.c"
|
||||
#include "../resources/toolbar_plugin_dsp.c"
|
||||
#include "../resources/toolbar_plugin_gfx.c"
|
||||
#include "../resources/toolbar_plugin_options.c"
|
||||
#include "../resources/toolbar_plugin_pad.c"
|
||||
#include "../resources/toolbar_refresh.c"
|
||||
#include "../resources/toolbar_stop.c"
|
||||
#include "../resources/Boomy.h" // Theme packages
|
||||
#include "../resources/Vista.h"
|
||||
#include "../resources/X-Plastik.h"
|
||||
#include "../resources/KDE.h"
|
||||
};
|
||||
|
||||
|
||||
@@ -329,7 +313,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||
ConsoleListener *Console = LogManager::GetInstance()->GetConsoleListener();
|
||||
if (SConfig::GetInstance().m_InterfaceConsole) Console->Open();
|
||||
|
||||
// Start debugging mazimized
|
||||
// Start debugging maximized
|
||||
if (UseDebugger) this->Maximize(true);
|
||||
// Debugger class
|
||||
if (UseDebugger)
|
||||
@@ -756,78 +740,107 @@ bool IsHotkey(wxKeyEvent &event, int Id)
|
||||
|
||||
int GetCmdForHotkey(unsigned int key)
|
||||
{
|
||||
if (key == HK_OPEN)
|
||||
switch (key)
|
||||
{
|
||||
case HK_OPEN:
|
||||
return wxID_OPEN;
|
||||
if (key == HK_CHANGE_DISC)
|
||||
|
||||
case HK_CHANGE_DISC:
|
||||
return IDM_CHANGEDISC;
|
||||
if (key == HK_REFRESH_LIST)
|
||||
|
||||
case HK_REFRESH_LIST:
|
||||
return wxID_REFRESH;
|
||||
|
||||
if (key == HK_PLAY_PAUSE)
|
||||
case HK_PLAY_PAUSE:
|
||||
return IDM_PLAY;
|
||||
if (key == HK_STOP)
|
||||
|
||||
case HK_STOP:
|
||||
return IDM_STOP;
|
||||
if (key == HK_RESET)
|
||||
|
||||
case HK_RESET:
|
||||
return IDM_RESET;
|
||||
if (key == HK_FRAME_ADVANCE)
|
||||
|
||||
case HK_FRAME_ADVANCE:
|
||||
return IDM_FRAMESTEP;
|
||||
|
||||
if (key == HK_START_RECORDING)
|
||||
case HK_START_RECORDING:
|
||||
return IDM_RECORD;
|
||||
if (key == HK_PLAY_RECORDING)
|
||||
|
||||
case HK_PLAY_RECORDING:
|
||||
return IDM_PLAYRECORD;
|
||||
if (key == HK_EXPORT_RECORDING)
|
||||
|
||||
case HK_EXPORT_RECORDING:
|
||||
return IDM_RECORDEXPORT;
|
||||
if (key == HK_READ_ONLY_MODE)
|
||||
|
||||
case HK_READ_ONLY_MODE:
|
||||
return IDM_RECORDREADONLY;
|
||||
|
||||
if (key == HK_FULLSCREEN)
|
||||
case HK_FULLSCREEN:
|
||||
return IDM_TOGGLE_FULLSCREEN;
|
||||
if (key == HK_SCREENSHOT)
|
||||
|
||||
case HK_SCREENSHOT:
|
||||
return IDM_SCREENSHOT;
|
||||
|
||||
if (key == HK_WIIMOTE1_CONNECT)
|
||||
case HK_WIIMOTE1_CONNECT:
|
||||
return IDM_CONNECT_WIIMOTE1;
|
||||
if (key == HK_WIIMOTE2_CONNECT)
|
||||
|
||||
case HK_WIIMOTE2_CONNECT:
|
||||
return IDM_CONNECT_WIIMOTE2;
|
||||
if (key == HK_WIIMOTE3_CONNECT)
|
||||
|
||||
case HK_WIIMOTE3_CONNECT:
|
||||
return IDM_CONNECT_WIIMOTE3;
|
||||
if (key == HK_WIIMOTE4_CONNECT)
|
||||
|
||||
case HK_WIIMOTE4_CONNECT:
|
||||
return IDM_CONNECT_WIIMOTE4;
|
||||
|
||||
if (key == HK_LOAD_STATE_SLOT_1)
|
||||
case HK_LOAD_STATE_SLOT_1:
|
||||
return IDM_LOADSLOT1;
|
||||
if (key == HK_LOAD_STATE_SLOT_2)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_2:
|
||||
return IDM_LOADSLOT2;
|
||||
if (key == HK_LOAD_STATE_SLOT_3)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_3:
|
||||
return IDM_LOADSLOT3;
|
||||
if (key == HK_LOAD_STATE_SLOT_4)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_4:
|
||||
return IDM_LOADSLOT4;
|
||||
if (key == HK_LOAD_STATE_SLOT_5)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_5:
|
||||
return IDM_LOADSLOT5;
|
||||
if (key == HK_LOAD_STATE_SLOT_6)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_6:
|
||||
return IDM_LOADSLOT6;
|
||||
if (key == HK_LOAD_STATE_SLOT_7)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_7:
|
||||
return IDM_LOADSLOT7;
|
||||
if (key == HK_LOAD_STATE_SLOT_8)
|
||||
|
||||
case HK_LOAD_STATE_SLOT_8:
|
||||
return IDM_LOADSLOT8;
|
||||
|
||||
if (key == HK_SAVE_STATE_SLOT_1)
|
||||
case HK_SAVE_STATE_SLOT_1:
|
||||
return IDM_SAVESLOT1;
|
||||
if (key == HK_SAVE_STATE_SLOT_2)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_2:
|
||||
return IDM_SAVESLOT2;
|
||||
if (key == HK_SAVE_STATE_SLOT_3)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_3:
|
||||
return IDM_SAVESLOT3;
|
||||
if (key == HK_SAVE_STATE_SLOT_4)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_4:
|
||||
return IDM_SAVESLOT4;
|
||||
if (key == HK_SAVE_STATE_SLOT_5)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_5:
|
||||
return IDM_SAVESLOT5;
|
||||
if (key == HK_SAVE_STATE_SLOT_6)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_6:
|
||||
return IDM_SAVESLOT6;
|
||||
if (key == HK_SAVE_STATE_SLOT_7)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_7:
|
||||
return IDM_SAVESLOT7;
|
||||
if (key == HK_SAVE_STATE_SLOT_8)
|
||||
|
||||
case HK_SAVE_STATE_SLOT_8:
|
||||
return IDM_SAVESLOT8;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -210,15 +210,6 @@ private:
|
||||
EToolbar_Max
|
||||
};
|
||||
|
||||
enum EBitmapsThemes
|
||||
{
|
||||
BOOMY,
|
||||
VISTA,
|
||||
XPLASTIK,
|
||||
KDE,
|
||||
THEMES_MAX
|
||||
};
|
||||
|
||||
wxBitmap m_Bitmaps[EToolbar_Max];
|
||||
wxBitmap m_BitmapsMenu[EToolbar_Max];
|
||||
|
||||
|
||||
@@ -78,23 +78,6 @@ Core::GetWindowHandle().
|
||||
// Resources
|
||||
extern "C" {
|
||||
#include "../resources/Dolphin.c" // Dolphin icon
|
||||
#include "../resources/toolbar_browse.c"
|
||||
#include "../resources/toolbar_file_open.c"
|
||||
#include "../resources/toolbar_fullscreen.c"
|
||||
#include "../resources/toolbar_help.c"
|
||||
#include "../resources/toolbar_pause.c"
|
||||
#include "../resources/toolbar_play.c"
|
||||
#include "../resources/toolbar_plugin_dsp.c"
|
||||
#include "../resources/toolbar_plugin_gfx.c"
|
||||
#include "../resources/toolbar_plugin_options.c"
|
||||
#include "../resources/toolbar_plugin_pad.c"
|
||||
#include "../resources/toolbar_plugin_wiimote.c"
|
||||
#include "../resources/toolbar_refresh.c"
|
||||
#include "../resources/toolbar_stop.c"
|
||||
#include "../resources/Boomy.h" // Theme packages
|
||||
#include "../resources/Vista.h"
|
||||
#include "../resources/X-Plastik.h"
|
||||
#include "../resources/KDE.h"
|
||||
};
|
||||
|
||||
bool confirmStop = false;
|
||||
@@ -441,7 +424,7 @@ void CFrame::PopulateToolbar(wxAuiToolBar* ToolBar)
|
||||
ToolBar->AddTool(IDM_PLAY, _("Play"), m_Bitmaps[Toolbar_Play], _("Play"));
|
||||
ToolBar->AddTool(IDM_STOP, _("Stop"), m_Bitmaps[Toolbar_Stop], _("Stop"));
|
||||
ToolBar->AddTool(IDM_TOGGLE_FULLSCREEN, _("FullScr"), m_Bitmaps[Toolbar_FullScreen], _("Toggle Fullscreen"));
|
||||
ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_FullScreen], _("Take Screenshot"));
|
||||
ToolBar->AddTool(IDM_SCREENSHOT, _("ScrShot"), m_Bitmaps[Toolbar_Screenshot], _("Take Screenshot"));
|
||||
ToolBar->AddSeparator();
|
||||
ToolBar->AddTool(wxID_PREFERENCES, _("Config"), m_Bitmaps[Toolbar_ConfigMain], _("Configure..."));
|
||||
ToolBar->AddTool(IDM_CONFIG_GFX_BACKEND, _("Graphics"), m_Bitmaps[Toolbar_ConfigGFX], _("Graphics settings"));
|
||||
@@ -512,102 +495,33 @@ void CFrame::RecreateToolbar()
|
||||
|
||||
void CFrame::InitBitmaps()
|
||||
{
|
||||
// Get selected theme
|
||||
int Theme = SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme;
|
||||
std::string theme(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name + "/");
|
||||
std::string dir(File::GetUserPath(D_THEMES_IDX) + theme);
|
||||
|
||||
// Save memory by only having one set of bitmaps loaded at any time. I mean, they are still
|
||||
// in the exe, which is in memory, but at least we wont make another copy of all of them.
|
||||
switch (Theme)
|
||||
{
|
||||
case BOOMY:
|
||||
{
|
||||
// These are stored as 48x48
|
||||
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(toolbar_file_open_png);
|
||||
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(toolbar_refresh_png);
|
||||
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(toolbar_browse_png);
|
||||
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(toolbar_play_png);
|
||||
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(toolbar_stop_png);
|
||||
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(toolbar_pause_png);
|
||||
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(toolbar_plugin_options_png);
|
||||
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(toolbar_plugin_gfx_png);
|
||||
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(toolbar_plugin_dsp_png);
|
||||
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(toolbar_plugin_pad_png);
|
||||
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(toolbar_plugin_wiimote_png);
|
||||
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
|
||||
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
|
||||
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(toolbar_help_png);
|
||||
#if !defined(_WIN32)
|
||||
// If theme does not exist in user's dir load from shared directory
|
||||
if (!File::Exists(dir))
|
||||
dir = SHARED_USER_DIR THEMES_DIR "/" + theme;
|
||||
#endif
|
||||
|
||||
// Scale the 48x48 bitmaps to 24x24
|
||||
for (size_t n = Toolbar_FileOpen; n < EToolbar_Max; n++)
|
||||
{
|
||||
m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(24, 24));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case VISTA:
|
||||
{
|
||||
// These are stored as 24x24 and need no scaling
|
||||
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open1_png);
|
||||
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh1_png);
|
||||
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse1_png);
|
||||
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play1_png);
|
||||
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop1_png);
|
||||
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause1_png);
|
||||
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options1_png);
|
||||
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx1_png);
|
||||
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP1_png);
|
||||
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad1_png);
|
||||
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote1_png);
|
||||
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
|
||||
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
|
||||
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help1_png);
|
||||
}
|
||||
break;
|
||||
|
||||
case XPLASTIK:
|
||||
{
|
||||
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open2_png);
|
||||
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh2_png);
|
||||
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse2_png);
|
||||
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play2_png);
|
||||
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop2_png);
|
||||
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause2_png);
|
||||
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options2_png);
|
||||
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx2_png);
|
||||
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP2_png);
|
||||
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad2_png);
|
||||
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote2_png);
|
||||
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
|
||||
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
|
||||
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help2_png);
|
||||
}
|
||||
break;
|
||||
|
||||
case KDE:
|
||||
{
|
||||
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open3_png);
|
||||
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh3_png);
|
||||
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse3_png);
|
||||
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play3_png);
|
||||
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop3_png);
|
||||
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause3_png);
|
||||
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options3_png);
|
||||
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx3_png);
|
||||
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP3_png);
|
||||
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad3_png);
|
||||
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote3_png);
|
||||
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
|
||||
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
|
||||
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help3_png);
|
||||
}
|
||||
break;
|
||||
|
||||
default: PanicAlertT("Theme selection went wrong");
|
||||
}
|
||||
m_Bitmaps[Toolbar_FileOpen].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Refresh].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Browse].LoadFile(dir + "browse.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Play].LoadFile(dir + "play.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Stop].LoadFile(dir + "stop.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Pause].LoadFile(dir + "pause.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_ConfigMain].LoadFile(dir + "config.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_ConfigGFX].LoadFile(dir + "graphics.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_ConfigDSP].LoadFile(dir + "dsp.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_ConfigPAD].LoadFile(dir + "gcpad.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Wiimote].LoadFile(dir + "wiimote.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Screenshot].LoadFile(dir + "screenshot.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_FullScreen].LoadFile(dir + "fullscreen.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Help].LoadFile(dir + "help.png", wxBITMAP_TYPE_PNG);
|
||||
|
||||
// Update in case the bitmap has been updated
|
||||
if (m_ToolBar != NULL) RecreateToolbar();
|
||||
if (m_ToolBar != NULL)
|
||||
RecreateToolbar();
|
||||
}
|
||||
|
||||
// Menu items
|
||||
@@ -1037,6 +951,7 @@ void CFrame::DoPause()
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
m_RenderParent->SetCursor(wxNullCursor);
|
||||
Core::UpdateTitle();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1214,6 +1129,8 @@ void CFrame::OnConfigPAD(wxCommandEvent& WXUNUSED (event))
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
Window win = X11Utils::XWindowFromHandle(GetHandle());
|
||||
Pad::Initialize((void *)win);
|
||||
#elif defined(__APPLE__)
|
||||
Pad::Initialize((void *)this);
|
||||
#else
|
||||
Pad::Initialize(GetHandle());
|
||||
#endif
|
||||
@@ -1238,6 +1155,8 @@ void CFrame::OnConfigWiimote(wxCommandEvent& WXUNUSED (event))
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
Window win = X11Utils::XWindowFromHandle(GetHandle());
|
||||
Wiimote::Initialize((void *)win);
|
||||
#elif defined(__APPLE__)
|
||||
Wiimote::Initialize((void *)this);
|
||||
#else
|
||||
Wiimote::Initialize(GetHandle());
|
||||
#endif
|
||||
@@ -1647,6 +1566,8 @@ void CFrame::UpdateGUI()
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
|
||||
}
|
||||
// Prepare to load last selected file, enable play button
|
||||
else if (!SConfig::GetInstance().m_LastFilename.empty()
|
||||
@@ -1655,6 +1576,8 @@ void CFrame::UpdateGUI()
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1662,6 +1585,8 @@ void CFrame::UpdateGUI()
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, false);
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
|
||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(false);
|
||||
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1677,6 +1602,8 @@ void CFrame::UpdateGUI()
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_RECORD)->Enable(true);
|
||||
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
|
||||
}
|
||||
}
|
||||
else if (Initialized)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "VideoConfig.h"
|
||||
#include "Host.h"
|
||||
#include "RenderBase.h"
|
||||
#include "ConfigManager.h"
|
||||
|
||||
#include "VertexShaderManager.h"
|
||||
#include "../GLInterface.h"
|
||||
@@ -90,13 +91,6 @@ bool cInterfaceAGL::Create(void *&window_handle)
|
||||
}
|
||||
|
||||
bool cInterfaceAGL::MakeCurrent()
|
||||
{
|
||||
[GLWin.cocoaCtx makeCurrentContext];
|
||||
return true;
|
||||
}
|
||||
|
||||
// Update window width, size and etc. Called from Render.cpp
|
||||
void cInterfaceAGL::Update()
|
||||
{
|
||||
int width, height;
|
||||
|
||||
@@ -110,6 +104,7 @@ void cInterfaceAGL::Update()
|
||||
[GLWin.cocoaCtx makeCurrentContext];
|
||||
s_backbuffer_width = width;
|
||||
s_backbuffer_height = height;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Close backend
|
||||
|
||||
@@ -26,6 +26,12 @@ void cInterfaceEGL::UpdateFPSDisplay(const char *text)
|
||||
{
|
||||
XStoreName(GLWin.dpy, GLWin.win, text);
|
||||
}
|
||||
|
||||
void cInterfaceEGL::SwapInterval(int Interval)
|
||||
{
|
||||
eglSwapInterval(GLWin.egl_dpy, Interval);
|
||||
}
|
||||
|
||||
void cInterfaceEGL::Swap()
|
||||
{
|
||||
eglSwapBuffers(GLWin.egl_dpy, GLWin.egl_surf);
|
||||
@@ -42,38 +48,30 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
||||
s_backbuffer_width = _twidth;
|
||||
s_backbuffer_height = _theight;
|
||||
|
||||
const char *s;
|
||||
EGLint egl_major, egl_minor;
|
||||
EGLint egl_major, egl_minor;
|
||||
|
||||
GLWin.dpy = XOpenDisplay(NULL);
|
||||
GLWin.dpy = XOpenDisplay(NULL);
|
||||
|
||||
if (!GLWin.dpy) {
|
||||
printf("Error: couldn't open display\n");
|
||||
return false;
|
||||
}
|
||||
if (!GLWin.dpy) {
|
||||
ERROR_LOG(VIDEO, "Error: couldn't open display\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
GLWin.egl_dpy = eglGetDisplay(GLWin.dpy);
|
||||
if (!GLWin.egl_dpy) {
|
||||
printf("Error: eglGetDisplay() failed\n");
|
||||
return false;
|
||||
}
|
||||
GLWin.egl_dpy = eglGetDisplay(GLWin.dpy);
|
||||
if (!GLWin.egl_dpy) {
|
||||
ERROR_LOG(VIDEO, "Error: eglGetDisplay() failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) {
|
||||
printf("Error: eglInitialize() failed\n");
|
||||
return false;
|
||||
}
|
||||
if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) {
|
||||
ERROR_LOG(VIDEO, "Error: eglInitialize() failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
s = eglQueryString(GLWin.egl_dpy, EGL_VERSION);
|
||||
printf("EGL_VERSION = %s\n", s);
|
||||
|
||||
s = eglQueryString(GLWin.egl_dpy, EGL_VENDOR);
|
||||
printf("EGL_VENDOR = %s\n", s);
|
||||
|
||||
s = eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS);
|
||||
printf("EGL_EXTENSIONS = %s\n", s);
|
||||
|
||||
s = eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS);
|
||||
printf("EGL_CLIENT_APIS = %s\n", s);
|
||||
INFO_LOG(VIDEO, "EGL_VERSION = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VERSION));
|
||||
INFO_LOG(VIDEO, "EGL_VENDOR = %s\n", eglQueryString(GLWin.egl_dpy, EGL_VENDOR));
|
||||
INFO_LOG(VIDEO, "EGL_EXTENSIONS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_EXTENSIONS));
|
||||
INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", eglQueryString(GLWin.egl_dpy, EGL_CLIENT_APIS));
|
||||
|
||||
// attributes for a visual in RGBA format with at least
|
||||
// 8 bits per color and a 24 bit depth buffer
|
||||
@@ -102,29 +100,29 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
||||
if (GLWin.parent == 0)
|
||||
GLWin.parent = RootWindow(GLWin.dpy, GLWin.screen);
|
||||
|
||||
XVisualInfo visTemplate;
|
||||
int num_visuals;
|
||||
EGLConfig config;
|
||||
EGLint num_configs;
|
||||
EGLint vid;
|
||||
XVisualInfo visTemplate;
|
||||
int num_visuals;
|
||||
EGLConfig config;
|
||||
EGLint num_configs;
|
||||
EGLint vid;
|
||||
|
||||
if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) {
|
||||
printf("Error: couldn't get an EGL visual config\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) {
|
||||
ERROR_LOG(VIDEO, "Error: couldn't get an EGL visual config\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
|
||||
printf("Error: eglGetConfigAttrib() failed\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &vid)) {
|
||||
ERROR_LOG(VIDEO, "Error: eglGetConfigAttrib() failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The X window visual must match the EGL config */
|
||||
visTemplate.visualid = vid;
|
||||
GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals);
|
||||
if (!GLWin.vi) {
|
||||
printf("Error: couldn't get X visual\n");
|
||||
exit(1);
|
||||
}
|
||||
/* The X window visual must match the EGL config */
|
||||
visTemplate.visualid = vid;
|
||||
GLWin.vi = XGetVisualInfo(GLWin.dpy, VisualIDMask, &visTemplate, &num_visuals);
|
||||
if (!GLWin.vi) {
|
||||
ERROR_LOG(VIDEO, "Error: couldn't get X visual\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
GLWin.x = _tx;
|
||||
GLWin.y = _ty;
|
||||
@@ -138,33 +136,26 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
||||
eglBindAPI(EGL_OPENGL_API);
|
||||
#endif
|
||||
GLWin.egl_ctx = eglCreateContext(GLWin.egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs );
|
||||
if (!GLWin.egl_ctx) {
|
||||
printf("Error: eglCreateContext failed\n");
|
||||
exit(1);
|
||||
}
|
||||
if (!GLWin.egl_ctx) {
|
||||
ERROR_LOG(VIDEO, "Error: eglCreateContext failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL);
|
||||
if (!GLWin.egl_surf) {
|
||||
printf("Error: eglCreateWindowSurface failed\n");
|
||||
exit(1);
|
||||
}
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.win, NULL);
|
||||
if (!GLWin.egl_surf) {
|
||||
ERROR_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) {
|
||||
|
||||
printf("Error: eglMakeCurrent() failed\n");
|
||||
return false;
|
||||
}
|
||||
if (!eglMakeCurrent(GLWin.egl_dpy, GLWin.egl_surf, GLWin.egl_surf, GLWin.egl_ctx)) {
|
||||
ERROR_LOG(VIDEO, "Error: eglMakeCurrent() failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
printf("GL_VENDOR: %s\n", glGetString(GL_VENDOR));
|
||||
printf("GL_RENDERER: %s\n", glGetString(GL_RENDERER));
|
||||
printf("GL_VERSION: %s\n", glGetString(GL_VERSION));
|
||||
printf("GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));
|
||||
/* Set initial projection/viewing transformation.
|
||||
* We can't be sure we'll get a ConfigureNotify event when the window
|
||||
* first appears.
|
||||
*/
|
||||
glViewport(0, 0, (GLint) _twidth, (GLint) _theight);
|
||||
INFO_LOG(VIDEO, "GL_VENDOR: %s\n", glGetString(GL_VENDOR));
|
||||
INFO_LOG(VIDEO, "GL_RENDERER: %s\n", glGetString(GL_RENDERER));
|
||||
INFO_LOG(VIDEO, "GL_VERSION: %s\n", glGetString(GL_VERSION));
|
||||
INFO_LOG(VIDEO, "GL_EXTENSIONS: %s\n", glGetString(GL_EXTENSIONS));
|
||||
window_handle = (void *)GLWin.win;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ private:
|
||||
cX11Window XWindow;
|
||||
public:
|
||||
friend class cX11Window;
|
||||
void SwapInterval(int Interval);
|
||||
void Swap();
|
||||
void UpdateFPSDisplay(const char *Text);
|
||||
bool Create(void *&window_handle);
|
||||
|
||||
@@ -27,6 +27,15 @@ void cInterfaceGLX::UpdateFPSDisplay(const char *text)
|
||||
{
|
||||
XStoreName(GLWin.dpy, GLWin.win, text);
|
||||
}
|
||||
|
||||
void cInterfaceGLX::SwapInterval(int Interval)
|
||||
{
|
||||
if (glXSwapIntervalSGI)
|
||||
glXSwapIntervalSGI(Interval);
|
||||
else
|
||||
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
|
||||
}
|
||||
|
||||
void cInterfaceGLX::Swap()
|
||||
{
|
||||
glXSwapBuffers(GLWin.dpy, GLWin.win);
|
||||
|
||||
@@ -31,6 +31,7 @@ private:
|
||||
cX11Window XWindow;
|
||||
public:
|
||||
friend class cX11Window;
|
||||
void SwapInterval(int Interval);
|
||||
void Swap();
|
||||
void UpdateFPSDisplay(const char *Text);
|
||||
bool Create(void *&window_handle);
|
||||
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
virtual bool MakeCurrent() = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
|
||||
virtual void SwapInterval(int Interval) { }
|
||||
virtual u32 GetBackBufferWidth() { return s_backbuffer_width; }
|
||||
virtual u32 GetBackBufferHeight() { return s_backbuffer_height; }
|
||||
virtual void SetBackBufferDimensions(u32 W, u32 H) {s_backbuffer_width = W; s_backbuffer_height = H; }
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
static HDC hDC = NULL; // Private GDI Device Context
|
||||
static HGLRC hRC = NULL; // Permanent Rendering Context
|
||||
|
||||
void cInterfaceWGL::SwapInterval(int Interval)
|
||||
{
|
||||
if (WGLEW_EXT_swap_control)
|
||||
wglSwapIntervalEXT(Interval);
|
||||
else
|
||||
ERROR_LOG(VIDEO, "No support for SwapInterval (framerate clamped to monitor refresh rate).");
|
||||
}
|
||||
void cInterfaceWGL::Swap()
|
||||
{
|
||||
SwapBuffers(hDC);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
class cInterfaceWGL : public cInterfaceBase
|
||||
{
|
||||
public:
|
||||
void SwapInterval(int Interval);
|
||||
void Swap();
|
||||
void UpdateFPSDisplay(const char *Text);
|
||||
bool Create(void *&window_handle);
|
||||
|
||||
@@ -23,6 +23,19 @@
|
||||
#include "../GLInterface.h"
|
||||
#include "WX.h"
|
||||
|
||||
void cInterfaceWX::SwapInterval(int Interval)
|
||||
{
|
||||
// WX interface only used on Apple
|
||||
#ifdef __APPLE__
|
||||
#if defined USE_WX && USE_WX
|
||||
NSOpenGLContext *ctx = GLWin.glCtxt->GetWXGLContext();
|
||||
#else
|
||||
NSOpenGLContext *ctx = GLWin.cocoaCtx;
|
||||
#endif
|
||||
[ctx setValues: &Interval forParameter: NSOpenGLCPSwapInterval];
|
||||
#endif
|
||||
}
|
||||
|
||||
void cInterfaceWX::Swap()
|
||||
{
|
||||
GLWin.glCanvas->SwapBuffers();
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
class cInterfaceWX : public cInterfaceBase
|
||||
{
|
||||
public:
|
||||
void SwapInterval(int Interval);
|
||||
void Swap();
|
||||
void UpdateFPSDisplay(const char *Text);
|
||||
bool Create(void *&window_handle);
|
||||
|
||||
@@ -57,6 +57,8 @@ size_t CGameListCtrl::m_numberItem = 0;
|
||||
std::string CGameListCtrl::m_currentFilename;
|
||||
bool sorted = false;
|
||||
|
||||
extern CFrame* main_frame;
|
||||
|
||||
static int CompareGameListItems(const GameListItem* iso1, const GameListItem* iso2,
|
||||
long sortData = CGameListCtrl::COLUMN_TITLE)
|
||||
{
|
||||
@@ -94,6 +96,13 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
switch(sortData)
|
||||
{
|
||||
case CGameListCtrl::COLUMN_TITLE:
|
||||
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
||||
{
|
||||
if (iso1->IsDiscTwo())
|
||||
return 1 * t;
|
||||
else if (iso2->IsDiscTwo())
|
||||
return -1 * t;
|
||||
}
|
||||
return strcasecmp(iso1->GetName(indexOne).c_str(),
|
||||
iso2->GetName(indexOther).c_str()) * t;
|
||||
case CGameListCtrl::COLUMN_NOTES:
|
||||
@@ -366,7 +375,8 @@ void CGameListCtrl::Update()
|
||||
SetItemFont(index, *wxITALIC_FONT);
|
||||
SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
|
||||
if (GetSelectedISO() == NULL)
|
||||
main_frame->UpdateGUI();
|
||||
Show();
|
||||
|
||||
AutomaticColumnWidth();
|
||||
@@ -968,7 +978,7 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
|
||||
{
|
||||
long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
if (item == wxNOT_FOUND)
|
||||
return new GameListItem(""); // TODO: wtf is this
|
||||
return NULL;
|
||||
else
|
||||
{
|
||||
// Here is a little workaround for multiselections:
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
|
||||
enum
|
||||
{
|
||||
Toolbar_DebugGo,
|
||||
Toolbar_DebugPause,
|
||||
Toolbar_Step,
|
||||
Toolbar_StepOver,
|
||||
Toolbar_Skip,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "ChunkFile.h"
|
||||
#include "../resources/no_banner.cpp"
|
||||
|
||||
#define CACHE_REVISION 0x10E
|
||||
#define CACHE_REVISION 0x10F
|
||||
|
||||
#define DVD_BANNER_WIDTH 96
|
||||
#define DVD_BANNER_HEIGHT 32
|
||||
@@ -91,6 +91,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||
|
||||
m_UniqueID = pVolume->GetUniqueID();
|
||||
m_BlobCompressed = DiscIO::IsCompressedBlob(_rFileName.c_str());
|
||||
m_IsDiscTwo = pVolume->IsDiscTwo();
|
||||
|
||||
// check if we can get some infos from the banner file too
|
||||
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
|
||||
@@ -235,6 +236,7 @@ void GameListItem::DoState(PointerWrap &p)
|
||||
p.Do(m_BlobCompressed);
|
||||
p.Do(m_pImage);
|
||||
p.Do(m_Platform);
|
||||
p.Do(m_IsDiscTwo);
|
||||
}
|
||||
|
||||
std::string GameListItem::CreateCacheFilename()
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
bool IsCompressed() const {return m_BlobCompressed;}
|
||||
u64 GetFileSize() const {return m_FileSize;}
|
||||
u64 GetVolumeSize() const {return m_VolumeSize;}
|
||||
bool IsDiscTwo() const {return m_IsDiscTwo;}
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
const wxImage& GetImage() const {return m_Image;}
|
||||
#endif
|
||||
@@ -87,6 +88,7 @@ private:
|
||||
bool m_BlobCompressed;
|
||||
std::vector<u8> m_pImage;
|
||||
u32 m_ImageSize;
|
||||
bool m_IsDiscTwo;
|
||||
|
||||
bool LoadFromCache();
|
||||
void SaveToCache();
|
||||
|
||||
@@ -315,10 +315,10 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
MMU = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable MMU"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
MMU->SetToolTip(_("Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)"));
|
||||
MMUBAT = new wxCheckBox(m_GameConfig, ID_MMUBAT, _("Enable BAT"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
MMUBAT->SetToolTip(_("Enables Block Address Translation (BAT); a function of the Memory Management Unit. Accurate to the hardware, but slow to emulate. (ON = Compatible, OFF = Fast)"));
|
||||
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game."));
|
||||
DCBZOFF = new wxCheckBox(m_GameConfig, ID_DCBZOFF, _("Skip DCBZ clearing"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled."));
|
||||
VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("Accurate VBeam emulation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)"));
|
||||
FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
@@ -328,8 +328,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
|
||||
// Wii Console
|
||||
EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("Enable WideScreen"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
DisableWiimoteSpeaker = new wxCheckBox(m_GameConfig, ID_DISABLEWIIMOTESPEAKER, _("Alternate Wiimote Timing"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
DisableWiimoteSpeaker->SetToolTip(_("Mutes the Wiimote speaker. Fixes random disconnections on real wiimotes. No effect on emulated wiimotes."));
|
||||
|
||||
// Video
|
||||
UseBBox = new wxCheckBox(m_GameConfig, ID_USE_BBOX, _("Enable Bounding Box Calculation"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER);
|
||||
@@ -364,7 +362,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
sbCoreOverrides->Add(CPUThread, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(SkipIdle, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(MMU, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(MMUBAT, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(TLBHack, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5);
|
||||
sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5);
|
||||
@@ -377,10 +375,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
||||
{
|
||||
sbWiiOverrides->ShowItems(false);
|
||||
EnableWideScreen->Hide();
|
||||
DisableWiimoteSpeaker->Hide();
|
||||
}
|
||||
sbWiiOverrides->Add(EnableWideScreen, 0, wxLEFT, 5);
|
||||
sbWiiOverrides->Add(DisableWiimoteSpeaker, 0, wxLEFT, 5);
|
||||
|
||||
wxStaticBoxSizer * const sbVideoOverrides =
|
||||
new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Video"));
|
||||
@@ -930,16 +926,16 @@ void CISOProperties::LoadGameConfig()
|
||||
else
|
||||
MMU->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Core", "BAT", &bTemp))
|
||||
MMUBAT->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
MMUBAT->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Core", "TLBHack", &bTemp))
|
||||
TLBHack->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
TLBHack->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Core", "DCBZ", &bTemp))
|
||||
DCBZOFF->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
DCBZOFF->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Core", "VBeam", &bTemp))
|
||||
VBeam->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
@@ -966,11 +962,6 @@ void CISOProperties::LoadGameConfig()
|
||||
else
|
||||
EnableWideScreen->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Wii", "DisableWiimoteSpeaker", &bTemp))
|
||||
DisableWiimoteSpeaker->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
DisableWiimoteSpeaker->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Video", "UseBBox", &bTemp))
|
||||
UseBBox->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
@@ -999,7 +990,6 @@ void CISOProperties::LoadGameConfig()
|
||||
if (!sTemp.empty())
|
||||
{
|
||||
EmuIssues->SetValue(wxString(sTemp.c_str(), *wxConvCurrent));
|
||||
bRefreshList = true;
|
||||
}
|
||||
EmuIssues->Enable(EmuState->GetSelection() != 0);
|
||||
|
||||
@@ -1025,16 +1015,16 @@ bool CISOProperties::SaveGameConfig()
|
||||
else
|
||||
GameIni.Set("Core", "MMU", MMU->Get3StateValue());
|
||||
|
||||
if (MMUBAT->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "BAT");
|
||||
else
|
||||
GameIni.Set("Core", "BAT", MMUBAT->Get3StateValue());
|
||||
|
||||
if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "TLBHack");
|
||||
else
|
||||
GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue());
|
||||
|
||||
if (DCBZOFF->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "DCBZ");
|
||||
else
|
||||
GameIni.Set("Core", "DCBZ", DCBZOFF->Get3StateValue());
|
||||
|
||||
if (VBeam->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "VBeam");
|
||||
else
|
||||
@@ -1060,11 +1050,6 @@ bool CISOProperties::SaveGameConfig()
|
||||
else
|
||||
GameIni.Set("Wii", "Widescreen", EnableWideScreen->Get3StateValue());
|
||||
|
||||
if (DisableWiimoteSpeaker->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Wii", "DisableWiimoteSpeaker");
|
||||
else
|
||||
GameIni.Set("Wii", "DisableWiimoteSpeaker", DisableWiimoteSpeaker->Get3StateValue());
|
||||
|
||||
if (UseBBox->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "UseBBox");
|
||||
else
|
||||
@@ -1085,6 +1070,11 @@ bool CISOProperties::SaveGameConfig()
|
||||
GameIni.Set("Video", "PH_ZFar", PHack_Data.PHZFar);
|
||||
|
||||
GameIni.Set("EmuState", "EmulationStateId", EmuState->GetSelection());
|
||||
|
||||
std::string sTemp;
|
||||
GameIni.Get("EmuState","EmulationIssues", &sTemp);
|
||||
if (EmuIssues->GetValue() != sTemp)
|
||||
bRefreshList = true;
|
||||
GameIni.Set("EmuState", "EmulationIssues", (const char*)EmuIssues->GetValue().mb_str(*wxConvCurrent));
|
||||
|
||||
PatchList_Save();
|
||||
|
||||
@@ -69,10 +69,10 @@ private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
// Core
|
||||
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
|
||||
wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF, *TLBHack;
|
||||
wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging, *DSPHLE;
|
||||
// Wii
|
||||
wxCheckBox *EnableWideScreen, *DisableWiimoteSpeaker;
|
||||
wxCheckBox *EnableWideScreen;
|
||||
// Video
|
||||
wxCheckBox *UseZTPSpeedupHack, *PHackEnable, *UseBBox;
|
||||
wxButton *PHSettings;
|
||||
@@ -127,7 +127,7 @@ private:
|
||||
ID_USEDUALCORE,
|
||||
ID_IDLESKIP,
|
||||
ID_MMU,
|
||||
ID_MMUBAT,
|
||||
ID_DCBZOFF,
|
||||
ID_TLBHACK,
|
||||
ID_VBEAM,
|
||||
ID_DISCSPEED,
|
||||
@@ -139,7 +139,6 @@ private:
|
||||
ID_PHSETTINGS,
|
||||
ID_ENABLEPROGRESSIVESCAN,
|
||||
ID_ENABLEWIDESCREEN,
|
||||
ID_DISABLEWIIMOTESPEAKER,
|
||||
ID_EDITCONFIG,
|
||||
ID_EMUSTATE,
|
||||
ID_EMU_ISSUES,
|
||||
|
||||
@@ -1099,8 +1099,8 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
|
||||
y = y/2;
|
||||
|
||||
wxMemoryDC memDC;
|
||||
wxBitmap bitmap(127, 127);
|
||||
memDC.SelectObject(bitmap);
|
||||
wxBitmap stick_bitmap(127, 127);
|
||||
memDC.SelectObject(stick_bitmap);
|
||||
memDC.SetBackground(*wxLIGHT_GREY_BRUSH);
|
||||
memDC.Clear();
|
||||
memDC.SetBrush(*wxWHITE_BRUSH);
|
||||
@@ -1116,5 +1116,5 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
|
||||
memDC.SetBrush(*wxBLUE_BRUSH);
|
||||
memDC.DrawCircle(x,y,5);
|
||||
memDC.SelectObject(wxNullBitmap);
|
||||
return bitmap;
|
||||
return stick_bitmap;
|
||||
}
|
||||
|
||||
@@ -110,12 +110,12 @@ wxString dump_frames_desc = wxTRANSLATE("Dump all rendered frames to an AVI file
|
||||
#if !defined WIN32 && defined HAVE_LIBAV
|
||||
wxString use_ffv1_desc = wxTRANSLATE("Encode frame dumps using the FFV1 codec.\n\nIf unsure, leave this unchecked.");
|
||||
#endif
|
||||
wxString free_look_desc = wxTRANSLATE("This feature allows you to change the game's camera.\nHold the right mouse button and move the mouse to pan the camera around. Hold SHIFT and press one of the WASD keys to move the camera by a certain step distance (SHIFT+0 to move faster and SHIFT+9 to move slower). Press SHIFT+R to reset the camera.\n\nIf unsure, leave this unchecked.");
|
||||
wxString free_look_desc = wxTRANSLATE("This feature allows you to change the game's camera.\nMove the mouse while holding the right mouse button to pan and while holding the middle button to move.\nHold SHIFT and press one of the WASD keys to move the camera by a certain step distance (SHIFT+0 to move faster and SHIFT+9 to move slower). Press SHIFT+R to reset the camera.\n\nIf unsure, leave this unchecked.");
|
||||
wxString crop_desc = wxTRANSLATE("Crop the picture from 4:3 to 5:4 or from 16:9 to 16:10.\n\nIf unsure, leave this unchecked.");
|
||||
wxString opencl_desc = wxTRANSLATE("[EXPERIMENTAL]\nAims to speed up emulation by offloading texture decoding to the GPU using the OpenCL framework.\nHowever, right now it's known to cause texture defects in various games. Also it's slower than regular CPU texture decoding in most cases.\n\nIf unsure, leave this unchecked.");
|
||||
wxString dlc_desc = wxTRANSLATE("[EXPERIMENTAL]\nSpeeds up emulation a bit by caching display lists.\nPossibly causes issues though.\n\nIf unsure, leave this unchecked.");
|
||||
wxString omp_desc = wxTRANSLATE("Use multiple threads to decode textures.\nMight result in a speedup (especially on CPUs with more than two cores).\n\nIf unsure, leave this unchecked.");
|
||||
wxString hotkeys_desc = wxTRANSLATE("Allows toggling certain options via the hotkeys 3, 4, 5 and 6 within the emulation window.\n\nIf unsure, leave this unchecked.");
|
||||
wxString hotkeys_desc = wxTRANSLATE("Allows toggling certain options via the hotkeys 3 (Internal Resolution), 4 (Aspect Ratio), 5 (Copy EFB) and 6 (Fog) within the emulation window.\n\nIf unsure, leave this unchecked.");
|
||||
wxString ppshader_desc = wxTRANSLATE("Apply a post-processing effect after finishing a frame.\n\nIf unsure, select (off).");
|
||||
wxString cache_efb_copies_desc = wxTRANSLATE("Slightly speeds up EFB to RAM copies by sacrificing emulation accuracy.\nSometimes also increases visual quality.\nIf you're experiencing any issues, try raising texture cache accuracy or disable this option.\n\nIf unsure, leave this unchecked.");
|
||||
wxString shader_errors_desc = wxTRANSLATE("Usually if shader compilation fails, an error message is displayed.\nHowever, one may skip the popups to allow interruption free gameplay by checking this option.\n\nIf unsure, leave this unchecked.");
|
||||
|
||||
@@ -124,12 +124,12 @@ void EWMH_Fullscreen(Display *dpy, int action)
|
||||
#if defined(HAVE_WX) && HAVE_WX
|
||||
Window XWindowFromHandle(void *Handle)
|
||||
{
|
||||
return GDK_WINDOW_XID(GTK_WIDGET(Handle)->window);
|
||||
return GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(Handle)));
|
||||
}
|
||||
|
||||
Display *XDisplayFromHandle(void *Handle)
|
||||
{
|
||||
return GDK_WINDOW_XDISPLAY(GTK_WIDGET(Handle)->window);
|
||||
return GDK_WINDOW_XDISPLAY(gtk_widget_get_window(GTK_WIDGET(Handle)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user