Run code through the advanced tool 'sed' to remove trailing whitespace.

This commit is contained in:
comex
2013-11-03 20:54:05 -05:00
parent 965b32be9c
commit c579637eaf
568 changed files with 8650 additions and 8654 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id,
EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
EditCheatName->SetValue(currentName);
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1);
EntrySelection->SetRange(1, ((int)arCodes.size()) > 0 ? (int)arCodes.size() : 1);
EntrySelection->SetValue((int)(arCodes.size() - selection));
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);
UpdateTextCtrl(tempEntries);
@@ -55,7 +55,7 @@ namespace ButtonManager
"InputL",
"InputR" };
const int configStringNum = 20;
void AddBind(std::string dev, sBind *bind)
{
auto it = m_controllers.find(dev);
@@ -93,9 +93,9 @@ namespace ButtonManager
{
hasbind = true;
type = BIND_AXIS;
sscanf(value.c_str(), "Device '%[^\']'-Axis %d%c", dev, &bindnum, &modifier);
sscanf(value.c_str(), "Device '%[^\']'-Axis %d%c", dev, &bindnum, &modifier);
}
else if (std::string::npos != value.find("Button"))
else if (std::string::npos != value.find("Button"))
{
hasbind = true;
type = BIND_BUTTON;
@@ -123,7 +123,7 @@ namespace ButtonManager
auto it = m_controllers.begin();
if (it == m_controllers.end())
return 0.0f;
return it->second->AxisValue(axis);
return it->second->AxisValue(axis);
}
void TouchEvent(int action, float x, float y)
{
@@ -185,7 +185,7 @@ namespace ButtonManager
{
// XXX: Make platform specific drawing
}
// InputDevice
void InputDevice::PressEvent(int button, int action)
{
@@ -212,8 +212,8 @@ namespace ButtonManager
return 0.0f;
if (it->second->m_bindtype == BIND_BUTTON)
return ButtonValue(axis);
else
else
return m_axises[it->second->m_bind] * it->second->m_neg;
}
}
@@ -72,7 +72,7 @@ namespace ButtonManager
char *image;
// image = LoadPNG((std::string(DOLPHIN_DATA_DIR "/") + filename).c_str(), width, height);
// XXX: Make platform specific drawing
m_button = button;
memcpy(m_coords, coords, sizeof(float) * 8);
m_state = BUTTON_RELEASED;
@@ -87,7 +87,7 @@ namespace ButtonManager
ButtonType GetButtonType() { return m_button; }
GLuint GetTexture() { return m_tex; }
float *GetCoords() { return m_coords; }
~Button() { }
};
@@ -97,11 +97,11 @@ namespace ButtonManager
const BindType m_bindtype;
const int m_bind;
const float m_neg;
sBind(ButtonType buttontype, BindType bindtype, int bind, float neg)
: m_buttontype(buttontype), m_bindtype(bindtype), m_bind(bind), m_neg(neg)
sBind(ButtonType buttontype, BindType bindtype, int bind, float neg)
: m_buttontype(buttontype), m_bindtype(bindtype), m_bind(bind), m_neg(neg)
{}
};
class InputDevice
{
@@ -120,7 +120,7 @@ namespace ButtonManager
for (auto it = m_binds.begin(); it != m_binds.end(); ++it)
delete it->second;
}
void AddBind(sBind *bind) { m_binds[bind->m_buttontype] = bind; }
void AddBind(sBind *bind) { m_binds[bind->m_buttontype] = bind; }
void PressEvent(int button, int action);
void AxisEvent(int axis, float value);
bool ButtonValue(ButtonType button);
@@ -40,7 +40,7 @@ char* LoadPNG(const char *filename, u32 &width, u32 &height)
/* Open the file. */
infile = fopen(filename, "rb");
if (!infile)
if (!infile)
return NULL;
/*
@@ -55,8 +55,8 @@ char* LoadPNG(const char *filename, u32 &width, u32 &height)
return NULL;
}
/*
* Set up the PNG structs
/*
* Set up the PNG structs
*/
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png_ptr) {
@@ -73,7 +73,7 @@ char* LoadPNG(const char *filename, u32 &width, u32 &height)
/*
* block to handle libpng errors,
* block to handle libpng errors,
* then check whether the PNG file had a bKGD chunk
*/
if (setjmp(png_jmpbuf(png_ptr))) {
@@ -82,16 +82,16 @@ char* LoadPNG(const char *filename, u32 &width, u32 &height)
return NULL;
}
/*
* takes our file stream pointer (infile) and
/*
* takes our file stream pointer (infile) and
* stores it in the png_ptr struct for later use.
*/
/* png_ptr->io_ptr = (png_voidp)infile;*/
png_init_io(png_ptr, infile);
/*
* lets libpng know that we already checked the 8
* signature bytes, so it should not expect to find
* lets libpng know that we already checked the 8
* signature bytes, so it should not expect to find
* them at the current file pointer location
*/
png_set_sig_bytes(png_ptr, 8);
@@ -99,25 +99,25 @@ char* LoadPNG(const char *filename, u32 &width, u32 &height)
/* Read the image */
/*
* reads and processes not only the PNG file's IHDR chunk
* but also any other chunks up to the first IDAT
* reads and processes not only the PNG file's IHDR chunk
* but also any other chunks up to the first IDAT
* (i.e., everything before the image data).
*/
/* read all the info up to the image data */
png_read_info(png_ptr, info_ptr);
png_get_IHDR(png_ptr, info_ptr, &_width, &_height, &bit_depth,
png_get_IHDR(png_ptr, info_ptr, &_width, &_height, &bit_depth,
&color_type, NULL, NULL, NULL);
/* Set up some transforms. */
if (bit_depth > 8)
if (bit_depth > 8)
png_set_strip_16(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_gray_to_rgb(png_ptr);
if (color_type == PNG_COLOR_TYPE_PALETTE)
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_palette_to_rgb(png_ptr);
/* Update the png info struct.*/
+2 -2
View File
@@ -73,7 +73,7 @@ void wxCheatsWindow::Init_ChildControls()
sizer_tab_cheats->Add(m_CheckListBox_CheatsList, 1, wxEXPAND | wxTOP | wxBOTTOM | wxLEFT, 10);
sizer_tab_cheats->Add(sGroupBoxInfo, 0, wxALIGN_LEFT | wxEXPAND | wxALL, 5);
m_Tab_Cheats->SetSizerAndFit(sizer_tab_cheats);
m_Tab_Cheats->SetSizerAndFit(sizer_tab_cheats);
// $ Cheat Search Tab
wxPanel* const tab_cheat_search = new CheatSearchTab(m_Notebook_Main);
@@ -594,7 +594,7 @@ CreateCodeDialog::CreateCodeDialog(wxWindow* const parent, const u32 address)
sizer_main->Add(textctrl_code, 0, wxALL, 5);
sizer_main->Add(sizer_value_label, 0, wxALL, 5);
sizer_main->Add(textctrl_value, 0, wxALL, 5);
sizer_main->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxALL, 5);
sizer_main->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxALL, 5);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CreateCodeDialog::PressOK, this, wxID_OK);
Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CreateCodeDialog::PressCancel, this, wxID_CANCEL);
+15 -15
View File
@@ -103,7 +103,7 @@ static const wxLanguage langIds[] =
#define WXSTR_TRANS(a) wxString(wxGetTranslation(wxT(a)))
#ifdef WIN32
//only used with xgettext to be picked up as translatable string.
//win32 does not have wx on its path, the provided wxALL_FILES
//win32 does not have wx on its path, the provided wxALL_FILES
//translation does not work there.
#define unusedALL_FILES wxTRANSLATE("All files (*.*)|*.*");
#endif
@@ -216,7 +216,7 @@ void CConfigMain::UpdateGUI()
CPUThread->Disable();
SkipIdle->Disable();
EnableCheats->Disable();
CPUEngine->Disable();
_NTSCJ->Disable();
@@ -253,12 +253,12 @@ void CConfigMain::InitializeGUILists()
// Emulator Engine
for (auto& CPUCores_a : CPUCores)
arrayStringFor_CPUEngine.Add(wxGetTranslation(CPUCores_a.name));
// DSP Engine
// DSP Engine
arrayStringFor_DSPEngine.Add(_("DSP HLE emulation (fast)"));
arrayStringFor_DSPEngine.Add(_("DSP LLE recompiler"));
arrayStringFor_DSPEngine.Add(_("DSP LLE interpreter (slow)"));
// Gamecube page
// GC Language arrayStrings
arrayStringFor_GCSystemLang.Add(_("English"));
@@ -268,16 +268,16 @@ void CConfigMain::InitializeGUILists()
arrayStringFor_GCSystemLang.Add(_("Italian"));
arrayStringFor_GCSystemLang.Add(_("Dutch"));
// Wii page
// Sensorbar Position
arrayStringFor_WiiSensBarPos.Add(_("Bottom"));
arrayStringFor_WiiSensBarPos.Add(_("Top"));
// Aspect ratio
arrayStringFor_WiiAspectRatio.Add(wxT("4:3"));
arrayStringFor_WiiAspectRatio.Add(wxT("16:9"));
// Wii Language arrayStrings
arrayStringFor_WiiSystemLang = arrayStringFor_GCSystemLang;
arrayStringFor_WiiSystemLang.Insert(_("Japanese"), 0);
@@ -318,7 +318,7 @@ void CConfigMain::InitializeGUILists()
void CConfigMain::InitializeGUIValues()
{
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
// General - Basic
CPUThread->SetValue(startup_params.bCPUThread);
SkipIdle->SetValue(startup_params.bSkipIdle);
@@ -473,7 +473,7 @@ void CConfigMain::InitializeGUIValues()
WiiEuRGB60->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.E60"));
WiiAspectRatio->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
WiiSystemLang->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
// Wii - Devices
WiiSDCard->SetValue(SConfig::GetInstance().m_WiiSDCard);
WiiKeyboard->SetValue(SConfig::GetInstance().m_WiiKeyboard);
@@ -525,7 +525,7 @@ void CConfigMain::InitializeGUITooltips()
void CConfigMain::CreateGUIControls()
{
InitializeGUILists();
// Create the notebook and pages
Notebook = new wxNotebook(this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize);
wxPanel* const GeneralPage = new wxPanel(Notebook, ID_GENERALPAGE, wxDefaultPosition, wxDefaultSize);
@@ -613,7 +613,7 @@ void CConfigMain::CreateGUIControls()
if (-1 == theme_selection->FindString(wxname))
theme_selection->Append(wxname);
});
theme_selection->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
// std::function = avoid error on msvc
@@ -639,7 +639,7 @@ void CConfigMain::CreateGUIControls()
sDisplayPage->Add(sbInterface, 0, wxEXPAND | wxALL, 5);
DisplayPage->SetSizer(sDisplayPage);
// Audio page
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"),
wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
@@ -796,7 +796,7 @@ void CConfigMain::CreateGUIControls()
sWiiPage->Add(sbWiiDeviceSettings, 0, wxEXPAND|wxALL, 5);
WiiPage->SetSizer(sWiiPage);
// Paths page
ISOPaths = new wxListBox(PathsPage, ID_ISOPATHS, wxDefaultPosition, wxDefaultSize, arrayStringFor_ISOPaths, wxLB_SINGLE, wxDefaultValidator);
RecursiveISOPath = new wxCheckBox(PathsPage, ID_RECURSIVEISOPATH, _("Search Subfolders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
@@ -988,7 +988,7 @@ void CConfigMain::AddAudioBackends()
{
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
// I'm sure Billiard will change this into an auto sometimes soon :P
for (std::vector<std::string>::const_iterator iter = backends.begin();
for (std::vector<std::string>::const_iterator iter = backends.begin();
iter != backends.end(); ++iter)
{
BackendSelection->Append(wxGetTranslation(StrToWxStr(*iter)));
+1 -1
View File
@@ -124,7 +124,7 @@ private:
wxCheckBox* EnableCheats;
wxChoice* Framelimit;
wxCheckBox* UseFPSForLimiting;
// Advanced
wxCheckBox* EnableOpenCL;
wxRadioBox* CPUEngine;
@@ -14,7 +14,7 @@ class BreakPointDlg : public wxDialog
{
public:
BreakPointDlg(CBreakPointWindow *_Parent);
private:
CBreakPointWindow *Parent;
wxTextCtrl *m_pEditAddress;
@@ -41,14 +41,14 @@ void CBreakPointView::Update()
int Item = InsertItem(0, temp);
temp = StrToWxStr("BP");
SetItem(Item, 1, temp);
Symbol *symbol = g_symbolDB.GetSymbolFromAddr(rBP.iAddress);
if (symbol)
{
temp = StrToWxStr(g_symbolDB.GetDescription(rBP.iAddress));
SetItem(Item, 2, temp);
}
sprintf(szBuffer, "%08x", rBP.iAddress);
temp = StrToWxStr(szBuffer);
SetItem(Item, 3, temp);
@@ -176,10 +176,10 @@ void CBreakPointWindow::LoadAll(wxCommandEvent& WXUNUSED(event))
IniFile ini;
BreakPoints::TBreakPointsStr newbps;
MemChecks::TMemChecksStr newmcs;
if (!ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)))
return;
if (ini.GetLines("BreakPoints", newbps, false))
PowerPC::breakpoints.AddFromStrings(newbps);
if (ini.GetLines("MemoryChecks", newmcs, false))
@@ -269,7 +269,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_JITRESULTS:
debugger->showJitResults(selection);
break;
case IDM_FOLLOWBRANCH:
{
u32 dest = AddrToBranch(selection);
@@ -280,7 +280,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
}
}
break;
case IDM_ADDFUNCTION:
symbol_db->AddFunction(selection);
Host_NotifyMapLoaded();
@@ -378,7 +378,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// --------------------------------------------------------------------
// Colors and brushes
// -------------------------
// -------------------------
dc.SetBackgroundMode(wxTRANSPARENT); // the text background
const wxChar* bgColor = _T("#ffffff");
wxPen nullPen(bgColor);
@@ -387,7 +387,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
nullPen.SetStyle(wxTRANSPARENT);
currentPen.SetStyle(wxSOLID);
wxBrush currentBrush(_T("#FFEfE8")); // light gray
wxBrush pcBrush(_T("#70FF70")); // green
wxBrush pcBrush(_T("#70FF70")); // green
wxBrush bpBrush(_T("#FF3311")); // red
wxBrush bgBrush(bgColor);
@@ -526,7 +526,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
// Colors and brushes
// -------------------------
dc.SetPen(currentPen);
for (int i = 0; i < numBranches; i++)
{
int x = 17 + 49 * charWidth + (branches[i].srcAddr % 9) * 8;
@@ -34,7 +34,7 @@ public:
void InsertBlrNop(int);
u32 GetSelection() {return(selection);}
void ToggleBreakpoint(u32 address);
void ToggleBreakpoint(u32 address);
struct BlrStruct // for IDM_INSERTBLR
{
@@ -348,20 +348,20 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
// CPU Mode
wxMenu* pCoreMenu = new wxMenu;
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"),
wxMenuItem* interpreter = pCoreMenu->Append(IDM_INTERPRETER, _("&Interpreter core"),
StrToWxStr("This is necessary to get break points"
" and stepping to work as explained in the Developer Documentation. But it can be very"
" slow, perhaps slower than 1 fps."),
" slow, perhaps slower than 1 fps."),
wxITEM_CHECK);
interpreter->Check(_LocalCoreStartupParameter.iCPUCore == 0);
pCoreMenu->AppendSeparator();
pCoreMenu->Append(IDM_JITBLOCKLINKING, _("&JIT Block Linking off"),
_("Provide safer execution by not linking the JIT blocks."),
_("Provide safer execution by not linking the JIT blocks."),
wxITEM_CHECK);
pCoreMenu->Append(IDM_JITNOBLOCKCACHE, _("&Disable JIT Cache"),
_("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from crashing.\n[This option must be selected before a game is started.]"),
_("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from crashing.\n[This option must be selected before a game is started.]"),
wxITEM_CHECK);
pCoreMenu->Append(IDM_CLEARCODECACHE, _("&Clear JIT cache"));
@@ -412,17 +412,17 @@ void CCodeWindow::CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParam
void CCodeWindow::CreateMenuOptions(wxMenu* pMenu)
{
wxMenuItem* boottopause = pMenu->Append(IDM_BOOTTOPAUSE, _("Boot to pause"),
_("Start the game directly instead of booting to pause"),
_("Start the game directly instead of booting to pause"),
wxITEM_CHECK);
boottopause->Check(bBootToPause);
wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"),
wxMenuItem* automaticstart = pMenu->Append(IDM_AUTOMATICSTART, _("&Automatic start"),
StrToWxStr(
"Automatically load the Default ISO when Dolphin starts, or the last game you loaded,"
" if you have not given it an elf file with the --elf command line. [This can be"
" convenient if you are bug-testing with a certain game and want to rebuild"
" and retry it several times, either with changes to Dolphin or if you are"
" developing a homebrew game.]"),
" developing a homebrew game.]"),
wxITEM_CHECK);
automaticstart->Check(bAutomaticStart);
@@ -480,7 +480,7 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
// Clear the JIT cache to enable these changes
JitInterface::ClearCache();
// Update
UpdateButtonStates();
}
@@ -108,7 +108,7 @@ void CCodeWindow::Save()
"Registers",
"Breakpoints",
"Memory",
"JIT",
"JIT",
"Sound",
"Video",
"Code"
@@ -19,7 +19,7 @@
DSPDebuggerLLE* m_DebuggerFrame = NULL;
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
EVT_CLOSE(DSPDebuggerLLE::OnClose)
EVT_MENU_RANGE(ID_RUNTOOL, ID_SHOWPCTOOL, DSPDebuggerLLE::OnChangeState)
EVT_TEXT_ENTER(ID_ADDRBOX, DSPDebuggerLLE::OnAddrBoxChange)
@@ -68,7 +68,7 @@ void GFXDebuggerPanel::SaveSettings() const
// TODO: get the screen resolution and make limits from that
if (GetPosition().x < 1000 && GetPosition().y < 1000
&& GetSize().GetWidth() < 1000
&& GetSize().GetWidth() < 1000
&& GetSize().GetHeight() < 1000)
{
file.Set("VideoWindow", "x", GetPosition().x);
@@ -74,7 +74,7 @@ private:
ID_COUNT
};
void OnClose(wxCloseEvent& event);
void OnClose(wxCloseEvent& event);
void CreateGUIControls();
void GeneralSettings(wxCommandEvent& event);
@@ -13,7 +13,7 @@ class MemoryCheckDlg : public wxDialog
{
public:
MemoryCheckDlg(CBreakPointWindow *parent);
private:
CBreakPointWindow *m_parent;
wxCheckBox* m_pReadFlag;
@@ -238,7 +238,7 @@ void CMemoryWindow::OnDumpMemory( wxCommandEvent& event )
// Write exram (aram or mem2) to file
void CMemoryWindow::OnDumpMem2( wxCommandEvent& event )
{
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{
DumpArray(File::GetUserPath(F_ARAMDUMP_IDX), Memory::m_pEXRAM, Memory::EXRAM_SIZE);
@@ -33,7 +33,7 @@ static u32 GetSpecialRegValue(int reg)
case 8: return PowerPC::ppcState.Exceptions;
case 9: return ProcessorInterface::GetMask();
case 10: return ProcessorInterface::GetCause();
default: return 0;
default: return 0;
}
}
@@ -154,7 +154,7 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind)
switch (col)
{
case 1: red = row < 32 ? m_CachedRegHasChanged[row] : m_CachedSpecialRegHasChanged[row-32]; break;
case 3:
case 3:
case 4: red = row < 32 ? m_CachedFRegHasChanged[row][col-3] : false; break;
}
+49 -49
View File
@@ -74,75 +74,75 @@ void FifoPlayerDlg::CreateGUIControls()
{
wxBoxSizer* sMain;
sMain = new wxBoxSizer(wxVERTICAL);
m_Notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
{
m_PlayPage = new wxPanel(m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
wxBoxSizer* sPlayPage;
sPlayPage = new wxBoxSizer(wxVERTICAL);
wxStaticBoxSizer* sPlayInfo;
sPlayInfo = new wxStaticBoxSizer(new wxStaticBox(m_PlayPage, wxID_ANY, _("File Info")), wxVERTICAL);
m_NumFramesLabel = new wxStaticText(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_NumFramesLabel->Wrap(-1);
sPlayInfo->Add(m_NumFramesLabel, 0, wxALL, 5);
m_CurrentFrameLabel = new wxStaticText(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_CurrentFrameLabel->Wrap(-1);
sPlayInfo->Add(m_CurrentFrameLabel, 0, wxALL, 5);
m_NumObjectsLabel = new wxStaticText(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_NumObjectsLabel->Wrap(-1);
sPlayInfo->Add(m_NumObjectsLabel, 0, wxALL, 5);
sPlayPage->Add(sPlayInfo, 1, wxEXPAND, 5);
wxStaticBoxSizer* sFrameRange;
sFrameRange = new wxStaticBoxSizer(new wxStaticBox(m_PlayPage, wxID_ANY, _("Frame Range")), wxHORIZONTAL);
m_FrameFromLabel = new wxStaticText(m_PlayPage, wxID_ANY, _("From"), wxDefaultPosition, wxDefaultSize, 0);
m_FrameFromLabel->Wrap(-1);
sFrameRange->Add(m_FrameFromLabel, 0, wxALL, 5);
m_FrameFromCtrl = new wxSpinCtrl(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10, 0);
sFrameRange->Add(m_FrameFromCtrl, 0, wxALL, 5);
m_FrameToLabel = new wxStaticText(m_PlayPage, wxID_ANY, _("To"), wxDefaultPosition, wxDefaultSize, 0);
m_FrameToLabel->Wrap(-1);
sFrameRange->Add(m_FrameToLabel, 0, wxALL, 5);
m_FrameToCtrl = new wxSpinCtrl(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(-1,-1), wxSP_ARROW_KEYS, 0, 10, 0);
sFrameRange->Add(m_FrameToCtrl, 0, wxALL, 5);
sPlayPage->Add(sFrameRange, 0, wxEXPAND, 5);
wxStaticBoxSizer* sObjectRange;
sObjectRange = new wxStaticBoxSizer(new wxStaticBox(m_PlayPage, wxID_ANY, _("Object Range")), wxHORIZONTAL);
m_ObjectFromLabel = new wxStaticText(m_PlayPage, wxID_ANY, _("From"), wxDefaultPosition, wxDefaultSize, 0);
m_ObjectFromLabel->Wrap(-1);
sObjectRange->Add(m_ObjectFromLabel, 0, wxALL, 5);
m_ObjectFromCtrl = new wxSpinCtrl(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10000, 0);
sObjectRange->Add(m_ObjectFromCtrl, 0, wxALL, 5);
m_ObjectToLabel = new wxStaticText(m_PlayPage, wxID_ANY, _("To"), wxDefaultPosition, wxDefaultSize, 0);
m_ObjectToLabel->Wrap(-1);
sObjectRange->Add(m_ObjectToLabel, 0, wxALL, 5);
m_ObjectToCtrl = new wxSpinCtrl(m_PlayPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10000, 0);
sObjectRange->Add(m_ObjectToCtrl, 0, wxALL, 5);
sPlayPage->Add(sObjectRange, 0, wxEXPAND, 5);
wxStaticBoxSizer* sPlayOptions;
sPlayOptions = new wxStaticBoxSizer(new wxStaticBox(m_PlayPage, wxID_ANY, _("Playback Options")), wxVERTICAL);
m_EarlyMemoryUpdates = new wxCheckBox(m_PlayPage, wxID_ANY, _("Early Memory Updates"), wxDefaultPosition, wxDefaultSize, 0);
sPlayOptions->Add(m_EarlyMemoryUpdates, 0, wxALL, 5);
sPlayPage->Add(sPlayOptions, 0, wxEXPAND, 5);
sPlayPage->AddStretchSpacer();
@@ -156,46 +156,46 @@ void FifoPlayerDlg::CreateGUIControls()
m_RecordPage = new wxPanel(m_Notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
wxBoxSizer* sRecordPage;
sRecordPage = new wxBoxSizer(wxVERTICAL);
wxStaticBoxSizer* sRecordInfo;
sRecordInfo = new wxStaticBoxSizer(new wxStaticBox(m_RecordPage, wxID_ANY, _("Recording Info")), wxVERTICAL);
m_RecordingFifoSizeLabel = new wxStaticText(m_RecordPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_RecordingFifoSizeLabel->Wrap(-1);
sRecordInfo->Add(m_RecordingFifoSizeLabel, 0, wxALL, 5);
m_RecordingMemSizeLabel = new wxStaticText(m_RecordPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_RecordingMemSizeLabel->Wrap(-1);
sRecordInfo->Add(m_RecordingMemSizeLabel, 0, wxALL, 5);
m_RecordingFramesLabel = new wxStaticText(m_RecordPage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
m_RecordingFramesLabel->Wrap(-1);
sRecordInfo->Add(m_RecordingFramesLabel, 0, wxALL, 5);
sRecordPage->Add(sRecordInfo, 0, wxEXPAND, 5);
wxBoxSizer* sRecordButtons;
sRecordButtons = new wxBoxSizer(wxHORIZONTAL);
m_RecordStop = new wxButton(m_RecordPage, wxID_ANY, _("Record"), wxDefaultPosition, wxDefaultSize, 0);
sRecordButtons->Add(m_RecordStop, 0, wxALL, 5);
m_Save = new wxButton(m_RecordPage, wxID_ANY, _("Save"), wxDefaultPosition, wxDefaultSize, 0);
sRecordButtons->Add(m_Save, 0, wxALL, 5);
sRecordPage->Add(sRecordButtons, 0, wxEXPAND, 5);
wxStaticBoxSizer* sRecordingOptions;
sRecordingOptions = new wxStaticBoxSizer(new wxStaticBox(m_RecordPage, wxID_ANY, _("Recording Options")), wxHORIZONTAL);
m_FramesToRecordLabel = new wxStaticText(m_RecordPage, wxID_ANY, _("Frames To Record"), wxDefaultPosition, wxDefaultSize, 0);
m_FramesToRecordLabel->Wrap(-1);
sRecordingOptions->Add(m_FramesToRecordLabel, 0, wxALL, 5);
wxString initialNum = wxString::Format(_T("%d"), m_FramesToRecord);
m_FramesToRecordCtrl = new wxSpinCtrl(m_RecordPage, wxID_ANY, initialNum, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 10000, 1);
sRecordingOptions->Add(m_FramesToRecordCtrl, 0, wxALL, 5);
sRecordPage->Add(sRecordingOptions, 0, wxEXPAND, 5);
sRecordPage->AddStretchSpacer();
@@ -353,7 +353,7 @@ void FifoPlayerDlg::OnFrameTo(wxSpinEvent& event)
player.SetFrameRangeEnd(event.GetPosition());
m_FrameFromCtrl->SetValue(player.GetFrameRangeStart());
m_FrameToCtrl->SetValue(player.GetFrameRangeEnd());
m_FrameToCtrl->SetValue(player.GetFrameRangeEnd());
}
void FifoPlayerDlg::OnObjectFrom(wxSpinEvent& event)
@@ -388,7 +388,7 @@ void FifoPlayerDlg::OnSaveFile(wxCommandEvent& WXUNUSED(event))
wxBeginBusyCursor();
bool result = file->Save(WxStrToStr(path).c_str());
wxEndBusyCursor();
// Wasn't able to save the file, shit's whack, yo.
if (!result)
PanicAlert("Error saving file");
@@ -624,8 +624,8 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
{
const AnalyzedFrameInfo& frame = player.GetAnalyzedFrameInfo(frame_idx);
const FifoFrameInfo& fifo_frame = player.GetFile()->GetFrame(frame_idx);
const u8* objectdata_start = &fifo_frame.fifoData[frame.objectStarts[object_idx]];
const u8* objectdata_end = &fifo_frame.fifoData[frame.objectEnds[object_idx]];
const u8* objectdata_start = &fifo_frame.fifoData[frame.objectStarts[object_idx]];
const u8* objectdata_end = &fifo_frame.fifoData[frame.objectEnds[object_idx]];
u8* objectdata = (u8*)objectdata_start;
const int obj_offset = objectdata_start - &fifo_frame.fifoData[frame.objectStarts[0]];
@@ -647,7 +647,7 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
// Between objectdata_end and next_objdata_start, there are register setting commands
if (object_idx + 1 < (int)frame.objectStarts.size())
{
const u8* next_objdata_start = &fifo_frame.fifoData[frame.objectStarts[object_idx+1]];
const u8* next_objdata_start = &fifo_frame.fifoData[frame.objectStarts[object_idx+1]];
while (objectdata < next_objdata_start)
{
m_objectCmdOffsets.push_back(objectdata - objectdata_start);
@@ -807,7 +807,7 @@ void FifoPlayerDlg::OnRecordingFinished(wxEvent&)
void FifoPlayerDlg::OnFrameWritten(wxEvent&)
{
m_CurrentFrameLabel->SetLabel(CreateCurrentFrameLabel());
m_NumObjectsLabel->SetLabel(CreateFileObjectCountLabel());
m_NumObjectsLabel->SetLabel(CreateFileObjectCountLabel());
}
void FifoPlayerDlg::UpdatePlayGui()
@@ -836,7 +836,7 @@ void FifoPlayerDlg::UpdateRecorderGui()
{
m_RecordingFifoSizeLabel->SetLabel(CreateRecordingFifoSizeLabel());
m_RecordingMemSizeLabel->SetLabel(CreateRecordingMemSizeLabel());
m_RecordingFramesLabel->SetLabel(CreateRecordingFrameCountLabel());
m_RecordingFramesLabel->SetLabel(CreateRecordingFrameCountLabel());
m_Save->Enable(GetSaveButtonEnabled());
}
@@ -867,7 +867,7 @@ wxString FifoPlayerDlg::CreateFileFrameCountLabel() const
if (file)
return CreateIntegerLabel(file->GetFrameCount(), _("Frame"));
return _("No file loaded");
}
@@ -877,7 +877,7 @@ wxString FifoPlayerDlg::CreateCurrentFrameLabel() const
if (file)
return _("Frame ") + wxString::Format(wxT("%i"), FifoPlayer::GetInstance().GetCurrentFrameNum());
return wxEmptyString;
}
@@ -887,7 +887,7 @@ wxString FifoPlayerDlg::CreateFileObjectCountLabel() const
if (file)
return CreateIntegerLabel(FifoPlayer::GetInstance().GetFrameObjectCount(), _("Object"));
return wxEmptyString;
}
@@ -901,9 +901,9 @@ wxString FifoPlayerDlg::CreateRecordingFifoSizeLabel() const
for (int i = 0; i < file->GetFrameCount(); ++i)
fifoBytes += file->GetFrame(i).fifoDataSize;
return CreateIntegerLabel(fifoBytes, _("FIFO Byte"));
return CreateIntegerLabel(fifoBytes, _("FIFO Byte"));
}
return _("No recorded file");
}
@@ -921,9 +921,9 @@ wxString FifoPlayerDlg::CreateRecordingMemSizeLabel() const
memBytes += memUpdate.size;
}
return CreateIntegerLabel(memBytes, _("Memory Byte"));
return CreateIntegerLabel(memBytes, _("Memory Byte"));
}
return wxEmptyString;
}
@@ -936,7 +936,7 @@ wxString FifoPlayerDlg::CreateRecordingFrameCountLabel() const
int numFrames = file->GetFrameCount();
return CreateIntegerLabel(numFrames, _("Frame"));
}
return wxEmptyString;
}
+1 -1
View File
@@ -28,7 +28,7 @@ private:
void OnObjectTo( wxSpinEvent& event );
void OnCheckEarlyMemoryUpdates( wxCommandEvent& event );
void OnRecordStop( wxCommandEvent& event );
void OnSaveFile( wxCommandEvent& event );
void OnSaveFile( wxCommandEvent& event );
void OnNumFramesToRecord( wxSpinEvent& event );
void OnCloseClick( wxCommandEvent& event );
+4 -4
View File
@@ -446,7 +446,7 @@ void CFrame::OnActive(wxActivateEvent& event)
#else
m_RenderParent->SetFocus();
#endif
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
Core::GetState() == Core::CORE_RUN)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
@@ -609,7 +609,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
{
wxString caption = event.GetString().BeforeFirst(':');
wxString text = event.GetString().AfterFirst(':');
bPanicResult = (wxYES == wxMessageBox(text,
bPanicResult = (wxYES == wxMessageBox(text,
caption, event.GetInt() ? wxYES_NO : wxOK, wxGetActiveWindow()));
panic_event.Set();
}
@@ -642,7 +642,7 @@ void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height)
void CFrame::OnRenderWindowSizeRequest(int width, int height)
{
if (Core::GetState() == Core::CORE_UNINITIALIZED ||
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize ||
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize ||
RendererIsFullscreen() || m_RenderFrame->IsMaximized())
return;
@@ -933,7 +933,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
{
int cmd = GetCmdForHotkey(i);
if (cmd >= 0)
{
{
wxCommandEvent evt(wxEVT_COMMAND_MENU_SELECTED, cmd);
wxMenuItem *item = GetMenuBar()->FindItem(cmd);
if (item && item->IsCheckable())
+4 -4
View File
@@ -164,7 +164,7 @@ public:
std::vector<int> Width, Height;
};
std::vector<SPerspectives> Perspectives;
u32 ActivePerspective;
u32 ActivePerspective;
private:
CGameListCtrl* m_GameListCtrl;
@@ -250,10 +250,10 @@ private:
void OnPaneClose(wxAuiManagerEvent& evt);
void ReloadPanes();
void DoLoadPerspective();
void OnDropDownToolbarSelect(wxCommandEvent& event);
void OnDropDownToolbarSelect(wxCommandEvent& event);
void OnDropDownSettingsToolbar(wxAuiToolBarEvent& event);
void OnDropDownToolbarItem(wxAuiToolBarEvent& event);
void OnSelectPerspective(wxCommandEvent& event);
void OnSelectPerspective(wxCommandEvent& event);
#ifdef _WIN32
// Override window proc for tricks like screensaver disabling
@@ -284,7 +284,7 @@ private:
void OnChangeDisc(wxCommandEvent& event);
void OnScreenshot(wxCommandEvent& event);
void OnActive(wxActivateEvent& event);
void OnClose(wxCloseEvent &event);
void OnClose(wxCloseEvent &event);
void OnLoadState(wxCommandEvent& event);
void OnSaveState(wxCommandEvent& event);
void OnLoadStateFromFile(wxCommandEvent& event);
+3 -3
View File
@@ -38,7 +38,7 @@ void CFrame::OnPaneClose(wxAuiManagerEvent& event)
if (!g_pCodeWindow)
{
if (nb->GetPage(0)->GetId() == IDM_LOGWINDOW ||
if (nb->GetPage(0)->GetId() == IDM_LOGWINDOW ||
nb->GetPage(0)->GetId() == IDM_LOGCONFIGWINDOW ||
nb->GetPage(0)->GetId() == IDM_CONSOLEWINDOW)
{
@@ -494,7 +494,7 @@ void CFrame::DoRemovePage(wxWindow *Win, bool bHide)
void CFrame::DoAddPage(wxWindow *Win, int i, bool Float)
{
if (!Win) return;
// Ensure accessor remains within valid bounds.
if (i < 0 || i > GetNotebookCount()-1)
i = 0;
@@ -577,7 +577,7 @@ void CFrame::OnDropDownToolbarItem(wxAuiToolBarEvent& event)
wxMenuItem* mItem = new wxMenuItem(menuPopup, IDM_PERSPECTIVES_0 + i,
StrToWxStr(Perspectives[i].Name),
wxT(""), wxITEM_CHECK);
menuPopup->Append(mItem);
if (i == ActivePerspective)
+24 -24
View File
@@ -98,7 +98,7 @@ void CFrame::CreateMenu()
wxMenu *externalDrive = new wxMenu;
fileMenu->Append(IDM_DRIVES, _("&Boot from DVD Drive..."), externalDrive);
drives = cdio_get_devices();
// Windows Limitation of 24 character drives
for (unsigned int i = 0; i < drives.size() && i < 24; i++) {
@@ -155,7 +155,7 @@ void CFrame::CreateMenu()
saveMenu->AppendSeparator();
loadMenu->Append(IDM_LOADSTATEFILE, GetMenuLabel(HK_LOAD_STATE_FILE));
loadMenu->Append(IDM_UNDOLOADSTATE, GetMenuLabel(HK_UNDO_LOAD_STATE));
loadMenu->AppendSeparator();
@@ -386,7 +386,7 @@ wxString CFrame::GetMenuLabel(int Id)
case HK_LOAD_STATE_SLOT_8:
case HK_LOAD_STATE_SLOT_9:
case HK_LOAD_STATE_SLOT_10:
Label = wxString::Format(_("Slot %i"),
Label = wxString::Format(_("Slot %i"),
Id - HK_LOAD_STATE_SLOT_1 + 1);
break;
@@ -400,7 +400,7 @@ wxString CFrame::GetMenuLabel(int Id)
case HK_SAVE_STATE_SLOT_8:
case HK_SAVE_STATE_SLOT_9:
case HK_SAVE_STATE_SLOT_10:
Label = wxString::Format(_("Slot %i"),
Label = wxString::Format(_("Slot %i"),
Id - HK_SAVE_STATE_SLOT_1 + 1);
break;
case HK_SAVE_STATE_FILE:
@@ -437,7 +437,7 @@ wxString CFrame::GetMenuLabel(int Id)
hotkeymodifier |= wxMOD_CONTROL;
#endif
hotkeymodifier &= wxMOD_CONTROL | wxMOD_ALT | wxMOD_SHIFT;
Modifier = InputCommon::WXKeymodToString(hotkeymodifier);
Hotkey = InputCommon::WXKeyToString(hotkey);
if (Modifier.Len() + Hotkey.Len() > 0)
@@ -505,7 +505,7 @@ void CFrame::RecreateToolbar()
m_ToolBar = new wxAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
PopulateToolbar(m_ToolBar);
m_Mgr->AddPane(m_ToolBar, wxAuiPaneInfo().
Name(wxT("TBMain")).Caption(wxT("TBMain")).
ToolbarPane().Top().
@@ -515,7 +515,7 @@ void CFrame::RecreateToolbar()
{
m_ToolBarDebug = new wxAuiToolBar(this, ID_TOOLBAR_DEBUG, wxDefaultPosition, wxDefaultSize, TOOLBAR_STYLE);
g_pCodeWindow->PopulateToolbar(m_ToolBarDebug);
m_Mgr->AddPane(m_ToolBarDebug, wxAuiPaneInfo().
Name(wxT("TBDebug")).Caption(wxT("TBDebug")).
ToolbarPane().Top().
@@ -695,7 +695,7 @@ void CFrame::OnChangeDisc(wxCommandEvent& WXUNUSED (event))
void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
{
int controllers = 0;
if (Movie::IsReadOnly())
{
//PanicAlertT("Cannot record movies in read-only mode.");
@@ -723,7 +723,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector(
_("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString,
_("Dolphin TAS Movies (*.dtm)") +
_("Dolphin TAS Movies (*.dtm)") +
wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
@@ -951,7 +951,7 @@ void CFrame::StartGame(const std::string& filename)
#else
m_RenderParent->SetFocus();
#endif
wxTheApp->Bind(wxEVT_KEY_DOWN, &CFrame::OnKeyDown, this);
wxTheApp->Bind(wxEVT_KEY_UP, &CFrame::OnKeyUp, this);
wxTheApp->Bind(wxEVT_RIGHT_DOWN, &CFrame::OnMouse, this);
@@ -1135,23 +1135,23 @@ void CFrame::DoStop()
void CFrame::DoRecordingSave()
{
bool paused = (Core::GetState() == Core::CORE_PAUSE);
if (!paused)
DoPause();
wxString path = wxFileSelector(
_("Select The Recording File"),
wxEmptyString, wxEmptyString, wxEmptyString,
_("Dolphin TAS Movies (*.dtm)") +
_("Dolphin TAS Movies (*.dtm)") +
wxString::Format(wxT("|*.dtm|%s"), wxGetTranslation(wxALL_FILES)),
wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT,
this);
if(path.IsEmpty())
return;
Movie::SaveRecording(WxStrToStr(path).c_str());
if (!paused)
DoPause();
}
@@ -1323,12 +1323,12 @@ void CFrame::OnMemcard(wxCommandEvent& WXUNUSED (event))
MemcardManager.ShowModal();
}
void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED (event))
void CFrame::OnExportAllSaves(wxCommandEvent& WXUNUSED (event))
{
CWiiSaveCrypted::ExportAllSaves();
}
void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event))
void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event))
{
wxString path = wxFileSelector(_("Select the save file"),
wxEmptyString, wxEmptyString, wxEmptyString,
@@ -1477,7 +1477,7 @@ void CFrame::OnLoadStateFromFile(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector(
_("Select the state to load"),
wxEmptyString, wxEmptyString, wxEmptyString,
_("All Save States (sav, s##)") +
_("All Save States (sav, s##)") +
wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
@@ -1491,7 +1491,7 @@ void CFrame::OnSaveStateToFile(wxCommandEvent& WXUNUSED (event))
wxString path = wxFileSelector(
_("Select the state to save"),
wxEmptyString, wxEmptyString, wxEmptyString,
_("All Save States (sav, s##)") +
_("All Save States (sav, s##)") +
wxString::Format(wxT("|*.sav;*.s??|%s"), wxGetTranslation(wxALL_FILES)),
wxFD_SAVE,
this);
@@ -1658,9 +1658,9 @@ void CFrame::UpdateGUI()
m_ToolBar->SetToolLabel(IDM_PLAY, _("Play"));
}
}
GetMenuBar()->FindItem(IDM_RECORDREADONLY)->Enable(Running || Paused);
if (!Initialized && !m_bGameLoading)
{
if (m_GameListCtrl->IsEnabled())
@@ -1791,17 +1791,17 @@ void CFrame::GameListChanged(wxCommandEvent& event)
Directories.push_back(File::GetUserPath(D_CACHE_IDX).c_str());
CFileSearch::XStringVector Extensions;
Extensions.push_back("*.cache");
CFileSearch FileSearch(Extensions, Directories);
const CFileSearch::XStringVector& rFilenames = FileSearch.GetFileNames();
for (auto& rFilename : rFilenames)
{
File::Delete(rFilename);
}
break;
}
// Update gamelist
if (m_GameListCtrl)
{
@@ -114,10 +114,10 @@ void cInterfaceAGL::Update()
if( s_backbuffer_width == size.width
&& s_backbuffer_height == size.height)
return;
s_backbuffer_width = size.width;
s_backbuffer_height = size.height;
[GLWin.cocoaCtx update];
}
@@ -53,7 +53,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
#ifdef USE_GLES
#ifdef USE_GLES3
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
// OpenGL ES 3 bit is disabled for now, until we have a way to select it from runtime
// Qualcomm drivers don't even care if it is ES2 or ES3 bit set.
// Intel drivers /might/ not care, but that code path is untested
+1 -1
View File
@@ -43,7 +43,7 @@ public:
void UpdateFPSDisplay(const char *Text);
bool Create(void *&window_handle);
bool MakeCurrent();
void Shutdown();
void Shutdown();
};
#endif
+1 -1
View File
@@ -37,7 +37,7 @@ public:
bool Create(void *&window_handle);
bool MakeCurrent();
bool ClearCurrent();
void Shutdown();
void Shutdown();
};
#endif
@@ -16,13 +16,13 @@ public:
virtual bool Create(void *&window_handle) { return true; }
virtual bool MakeCurrent() { return true; }
virtual bool ClearCurrent() { return true; }
virtual void Shutdown() {}
virtual void Shutdown() {}
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; }
virtual void Update() { }
virtual void Update() { }
virtual bool PeekMessages() { return false; }
};
#endif
@@ -110,7 +110,7 @@ out:
if (GLWin.wl_display)
wl_display_disconnect(GLWin.wl_display);
}
#endif
#if HAVE_X11
if (selected_platform != EGL_PLATFORM_X11) {
@@ -179,7 +179,7 @@ EGLNativeWindowType cPlatform::CreateWindow(void)
return (EGLNativeWindowType) XInterface.CreateWindow();
#endif
#ifdef ANDROID
return (EGLNativeWindowType)Host_GetRenderHandle();
return (EGLNativeWindowType)Host_GetRenderHandle();
#endif
return 0;
}
@@ -84,7 +84,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
0, // Shift Bit Ignored
0, // No Accumulation Buffer
0, 0, 0, 0, // Accumulation Bits Ignored
0, // 0Bit Z-Buffer (Depth Buffer)
0, // 0Bit Z-Buffer (Depth Buffer)
0, // 0bit Stencil Buffer
0, // No Auxiliary Buffer
PFD_MAIN_PLANE, // Main Drawing Layer
+1 -1
View File
@@ -22,7 +22,7 @@ public:
bool Create(void *&window_handle);
bool MakeCurrent();
bool ClearCurrent();
void Shutdown();
void Shutdown();
void Update();
bool PeekMessages();
+12 -12
View File
@@ -62,7 +62,7 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
int indexOne = 0;
int indexOther = 0;
// index only matters for WADS and PAL GC games, but invalid indicies for the others
// will return the (only) language in the list
if (iso1->GetPlatform() == GameListItem::WII_WAD)
@@ -307,7 +307,7 @@ void CGameListCtrl::Update()
#else
const int platform_padding = 8;
#endif
// set initial sizes for columns
SetColumnWidth(COLUMN_DUMMY,0);
SetColumnWidth(COLUMN_PLATFORM, 35 + platform_padding);
@@ -375,10 +375,10 @@ void CGameListCtrl::Update()
wxString NiceSizeFormat(u64 _size)
{
const char* const unit_symbols[] = {"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"};
auto const unit = Log2(std::max<u64>(_size, 1)) / 10;
auto const unit_size = (1 << (unit * 10));
// ugly rounding integer math
auto const value = (_size + unit_size / 2) / unit_size;
auto const frac = (_size % unit_size * 10 + unit_size / 2) / unit_size % 10;
@@ -409,13 +409,13 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
SetItemColumnImage(_Index, COLUMN_BANNER, ImageIndex);
int SelectedLanguage = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
// Is this sane?
if (rISOFile.GetPlatform() == GameListItem::WII_WAD)
{
SelectedLanguage = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
}
std::string const name = rISOFile.GetName(SelectedLanguage);
SetItem(_Index, COLUMN_TITLE, StrToWxStr(name), -1);
@@ -826,7 +826,7 @@ void CGameListCtrl::OnLeftClick(wxMouseEvent& event)
}
void CGameListCtrl::OnRightClick(wxMouseEvent& event)
{
{
// Focus the clicked item.
int flags;
long item = HitTest(event.GetPosition(), flags);
@@ -869,7 +869,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
{
if (selected_iso->IsCompressed())
popupMenu->Append(IDM_COMPRESSGCM, _("Decompress ISO..."));
else if (selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".ciso"
else if (selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".ciso"
&& selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".wbfs")
popupMenu->Append(IDM_COMPRESSGCM, _("Compress ISO..."));
}
@@ -1105,7 +1105,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
if (wxFileExists(StrToWxStr(OutputFileName)) &&
wxMessageBox(
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
StrToWxStr(OutputFileName)),
StrToWxStr(OutputFileName)),
_("Confirm File Overwrite"),
wxYES_NO) == wxNO)
continue;
@@ -1133,7 +1133,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
if (wxFileExists(StrToWxStr(OutputFileName)) &&
wxMessageBox(
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"),
StrToWxStr(OutputFileName)),
StrToWxStr(OutputFileName)),
_("Confirm File Overwrite"),
wxYES_NO) == wxNO)
continue;
@@ -1194,7 +1194,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
StrToWxStr(FilePath),
StrToWxStr(FileName) + _T(".gcz"),
wxEmptyString,
_("All compressed GC/Wii ISO files (gcz)") +
_("All compressed GC/Wii ISO files (gcz)") +
wxString::Format(wxT("|*.gcz|%s"), wxGetTranslation(wxALL_FILES)),
wxFD_SAVE,
this);
@@ -1203,7 +1203,7 @@ void CGameListCtrl::OnCompressGCM(wxCommandEvent& WXUNUSED (event))
return;
} while (wxFileExists(path) &&
wxMessageBox(
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"), path.c_str()),
wxString::Format(_("The file %s already exists.\nDo you wish to replace it?"), path.c_str()),
_("Confirm File Overwrite"),
wxYES_NO) == wxNO);
+1 -1
View File
@@ -75,7 +75,7 @@ private:
void InsertItemInReportView(long _Index);
void SetBackgroundColor();
void ScanForISOs();
DECLARE_EVENT_TABLE()
// events
+4 -4
View File
@@ -52,7 +52,7 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent)
wxBoxSizer* const sizer_vert = new wxBoxSizer(wxVERTICAL);
sizer_vert->Add(sizer_infobox, 1, wxEXPAND);
sizer_vert->Add(sizer_buttons, 0, wxEXPAND | wxTOP, 5);
wxBoxSizer* const sizer_main = new wxBoxSizer(wxVERTICAL);
sizer_main->Add(m_listbox_gcodes, 1, wxALL | wxEXPAND, 5);
sizer_main->Add(sizer_vert, 0, wxALL | wxEXPAND, 5);
@@ -76,7 +76,7 @@ void CodeConfigPanel::UpdateCodeList(bool checkRunning)
if (gcodes_iter->enabled)
m_listbox_gcodes->Check(m_listbox_gcodes->GetCount()-1, true);
}
wxCommandEvent evt;
UpdateInfoBox(evt);
}
@@ -146,7 +146,7 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
std::string gameid = m_gameid;
switch (m_gameid[0])
{
case 'R':
@@ -225,7 +225,7 @@ void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
// read code lines
case 1 :
{
std::istringstream ssline(line);
std::istringstream ssline(line);
std::string addr, data;
ssline >> addr >> data;
ssline.seekg(0);
+1 -1
View File
@@ -128,7 +128,7 @@ enum
IDM_CONFIG_HOTKEYS,
IDM_CONFIG_LOGGER,
// Views
// Views
IDM_LOGWINDOW,
IDM_LOGCONFIGWINDOW,
IDM_CONSOLEWINDOW,
+2 -2
View File
@@ -255,12 +255,12 @@ void HotkeyConfigDialog::CreateHotkeyGUIControls(void)
wxStaticText *StaticTextHeader = new wxStaticText(Page, wxID_ANY, _("Action"));
HeaderSizer->Add(StaticTextHeader, 1, wxALL, 2);
StaticTextHeader = new wxStaticText(Page, wxID_ANY, _("Key"), wxDefaultPosition, size);
HeaderSizer->Add(StaticTextHeader, 0, wxALL, 2);
HeaderSizer->Add(StaticTextHeader, 0, wxALL, 2);
sHotkeys->Add(HeaderSizer, wxGBPosition(0, i), wxDefaultSpan, wxEXPAND | wxLEFT, (i > 0) ? 30 : 1);
}
int column_break = (page_breaks[j+1] + page_breaks[j] + 1) / 2;
for (int i = page_breaks[j]; i < page_breaks[j+1]; i++)
{
// Text for the action
+6 -6
View File
@@ -82,7 +82,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
m_names = pBannerLoader->GetNames();
m_company = pBannerLoader->GetCompany();
m_descriptions = pBannerLoader->GetDescriptions();
std::vector<u32> Buffer = pBannerLoader->GetBanner(&m_ImageWidth, &m_ImageHeight);
u32* pData = &Buffer[0];
// resize vector to image size
@@ -212,7 +212,7 @@ std::string GameListItem::GetDescription(int _index) const
if (index < m_descriptions.size())
return m_descriptions[index];
if (!m_descriptions.empty())
return m_descriptions[0];
@@ -229,7 +229,7 @@ std::string GameListItem::GetVolumeName(int _index) const
if (!m_volume_names.empty())
return m_volume_names[0];
return "";
}
@@ -240,7 +240,7 @@ std::string GameListItem::GetBannerName(int _index) const
if (index < m_names.size() && !m_names[index].empty())
return m_names[index];
if (!m_names.empty())
return m_names[0];
@@ -251,9 +251,9 @@ std::string GameListItem::GetBannerName(int _index) const
std::string GameListItem::GetName(int _index) const
{
// Prefer name from banner, fallback to name from volume, fallback to filename
std::string name = GetBannerName(_index);
if (name.empty())
name = GetVolumeName(_index);
+23 -23
View File
@@ -196,7 +196,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
m_Country->SetValue(_("UNKNOWN"));
break;
}
if (IsWiiDisc) // Only one language with wii banners
{
m_Lang->SetSelection(0);
@@ -218,7 +218,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
{
ChangeBannerDetails(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
}
m_Banner->SetBitmap(OpenGameListItem->GetBitmap());
m_Banner->Bind(wxEVT_RIGHT_DOWN, &CISOProperties::RightClickOnBanner, this);
@@ -233,7 +233,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
WiiPartition partition = WiiDisc.at(i);
wxTreeItemId PartitionRoot =
m_Treectrl->AppendItem(RootId, wxString::Format(_("Partition %i"), i), 0, 0);
CreateDirectoryTree(PartitionRoot, partition.Files, 1, partition.Files.at(0)->m_FileSize);
CreateDirectoryTree(PartitionRoot, partition.Files, 1, partition.Files.at(0)->m_FileSize);
if (i == 1)
m_Treectrl->Expand(PartitionRoot);
}
@@ -260,7 +260,7 @@ CISOProperties::~CISOProperties()
size_t CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
std::vector<const DiscIO::SFileInfo*> fileInfos,
const size_t _FirstIndex,
const size_t _FirstIndex,
const size_t _LastIndex)
{
size_t CurrentIndex = _FirstIndex;
@@ -365,7 +365,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
UseZTPSpeedupHack = new wxCheckBox(m_GameConfig, ID_ZTP_SPEEDUP, _("ZTP hack"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Video", "ZTPSpeedupHack"));
UseZTPSpeedupHack->SetToolTip(_("Enable this to speed up The Legend of Zelda: Twilight Princess. Disable for ANY other game."));
// Hack
wxFlexGridSizer * const szrPHackSettings = new wxFlexGridSizer(0);
PHackEnable = new wxCheckBox(m_GameConfig, ID_PHACKENABLE, _("Custom Projection Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE);
@@ -396,7 +396,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5);
sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5);
sbCoreOverrides->Add(SyncGPU, 0, wxLEFT, 5);
sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5);
sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5);
sbCoreOverrides->Add(BlockMerging, 0, wxLEFT, 5);
sbCoreOverrides->Add(DSPHLE, 0, wxLEFT, 5);
@@ -430,7 +430,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sConfigPage->Add(sEmuState, 0, wxEXPAND|wxALL, 5);
m_GameConfig->SetSizer(sConfigPage);
// Patches
wxBoxSizer * const sPatches = new wxBoxSizer(wxVERTICAL);
Patches = new wxCheckListBox(m_PatchPage, ID_PATCHES_LIST, wxDefaultPosition,
@@ -452,7 +452,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sPatchPage->Add(sPatches, 1, wxEXPAND|wxALL, 5);
m_PatchPage->SetSizer(sPatchPage);
// Action Replay Cheats
wxBoxSizer * const sCheats = new wxBoxSizer(wxVERTICAL);
Cheats = new wxCheckListBox(m_CheatPage, ID_CHEATS_LIST, wxDefaultPosition,
@@ -475,7 +475,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sCheatPage->Add(sCheats, 1, wxEXPAND|wxALL, 5);
m_CheatPage->SetSizer(sCheatPage);
wxStaticText * const m_NameText =
new wxStaticText(m_Information, wxID_ANY, _("Name:"));
m_Name = new wxTextCtrl(m_Information, ID_NAME, wxEmptyString,
@@ -501,7 +501,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
m_Date = new wxTextCtrl(m_Information, ID_DATE, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
wxStaticText * const m_FSTText =
new wxStaticText(m_Information, wxID_ANY, _("FST Size:"));
new wxStaticText(m_Information, wxID_ANY, _("FST Size:"));
m_FST = new wxTextCtrl(m_Information, ID_FST, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
@@ -519,12 +519,12 @@ void CISOProperties::CreateGUIControls(bool IsWad)
arrayStringFor_Lang.Add(_("Simplified Chinese"));
arrayStringFor_Lang.Add(_("Traditional Chinese"));
arrayStringFor_Lang.Add(_("Korean"));
language = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
}
m_Lang = new wxChoice(m_Information, ID_LANG, wxDefaultPosition, wxDefaultSize, arrayStringFor_Lang);
m_Lang->SetSelection(language);
wxStaticText * const m_ShortText = new wxStaticText(m_Information, wxID_ANY, _("Short Name:"));
m_ShortName = new wxTextCtrl(m_Information, ID_SHORTNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY);
wxStaticText * const m_MakerText = new wxStaticText(m_Information, wxID_ANY, _("Maker:"));
@@ -670,9 +670,9 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
popupMenu->Append(IDM_EXTRACTDIR, _("Extract Directory..."));
else if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 2)
popupMenu->Append(IDM_EXTRACTFILE, _("Extract File..."));
popupMenu->Append(IDM_EXTRACTALL, _("Extract All Files..."));
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
{
@@ -682,7 +682,7 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
popupMenu->AppendSeparator();
popupMenu->Append(IDM_CHECKINTEGRITY, _("Check Partition Integrity"));
}
PopupMenu(popupMenu);
event.Skip();
@@ -694,7 +694,7 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
wxString File;
File = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
Path = wxFileSelector(
_("Export File"),
wxEmptyString, File, wxEmptyString,
@@ -784,7 +784,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
{
dialog.SetTitle(wxString::Format(wxT("%s : %d%%"), dialogTitle.c_str(),
(u32)(((float)(i - index[0]) / (float)(index[1] - index[0])) * 100)));
dialog.Update(i, wxString::Format(_("Extracting %s"),
StrToWxStr(fst[i]->m_FullPath)));
@@ -794,7 +794,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
if (fst[i]->IsDirectory())
{
snprintf(exportName, sizeof(exportName), "%s/%s/", _rExportFolder, fst[i]->m_FullPath);
DEBUG_LOG(DISCIO, "%s", exportName);
DEBUG_LOG(DISCIO, "%s", exportName);
if (!File::Exists(exportName) && !File::CreateFullPath(exportName))
{
@@ -879,7 +879,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
wxString Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
std::size_t partitionNum = (std::size_t)wxAtoi(Directory.Mid(Directory.find_first_of("/"), 1));
Directory.Remove(0, Directory.find_first_of("/") +1); // Remove "Partition x/"
if(WiiDisc.size() > partitionNum)
{
// Get the filesystem of the LAST partition
@@ -895,7 +895,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
{
FS = pFileSystem;
}
bool ret = false;
if (event.GetId() == IDM_EXTRACTAPPLOADER)
{
@@ -1159,7 +1159,7 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
bRefreshList = true; // Just in case
// Once we're done with the ini edit, give the focus back to Dolphin
// Once we're done with the ini edit, give the focus back to Dolphin
SetFocus();
}
@@ -1273,7 +1273,7 @@ void CISOProperties::PHackButtonClicked(wxCommandEvent& event)
void CISOProperties::PatchButtonClicked(wxCommandEvent& event)
{
int selection = Patches->GetSelection();
switch (event.GetId())
{
case ID_EDITPATCH:
@@ -1352,7 +1352,7 @@ void CISOProperties::ActionReplayList_Save()
void CISOProperties::ActionReplayButtonClicked(wxCommandEvent& event)
{
int selection = Cheats->GetSelection();
switch (event.GetId())
{
case ID_EDITCHEAT:
+1 -1
View File
@@ -192,7 +192,7 @@ private:
size_t CreateDirectoryTree(wxTreeItemId& parent,
std::vector<const DiscIO::SFileInfo*> fileInfos,
const size_t _FirstIndex,
const size_t _FirstIndex,
const size_t _LastIndex);
void ExportDir(const char* _rFullPath, const char* _rExportFilename,
const int partitionNum = 0);
@@ -307,7 +307,7 @@ bool ControlDialog::Validate()
void GamepadPage::SetDevice(wxCommandEvent&)
{
controller->default_device.FromString(WxStrToStr(device_cbox->GetValue()));
// show user what it was validated as
device_cbox->SetValue(StrToWxStr(controller->default_device.ToString()));
@@ -322,7 +322,7 @@ void GamepadPage::SetDevice(wxCommandEvent&)
void ControlDialog::SetDevice(wxCommandEvent&)
{
m_devq.FromString(WxStrToStr(device_cbox->GetValue()));
// show user what it was validated as
device_cbox->SetValue(StrToWxStr(m_devq.ToString()));
@@ -647,7 +647,7 @@ void GamepadPage::SaveProfile(wxCommandEvent&)
IniFile inifile;
controller->SaveConfig(inifile.GetOrCreateSection("Profile"));
inifile.Save(fname);
m_config_dialog->UpdateProfileComboBox();
}
else
@@ -731,7 +731,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
{
wxStaticText* const label = new wxStaticText(parent, -1, wxGetTranslation(StrToWxStr((*ci)->name)));
ControlButton* const control_button = new ControlButton(parent, (*ci)->control_ref, 80);
control_button->SetFont(m_SmallFont);
@@ -827,7 +827,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
if (GROUP_TYPE_MIXED_TRIGGERS == group->type)
width = 64+12+1;
if (GROUP_TYPE_TRIGGERS != group->type)
height /= 2;
+2 -2
View File
@@ -86,7 +86,7 @@ class ControlDialog : public wxDialog
{
public:
ControlDialog(GamepadPage* const parent, InputPlugin& plugin, ControllerInterface::ControlReference* const ref);
wxStaticBoxSizer* CreateControlChooser(GamepadPage* const parent);
virtual bool Validate();
@@ -207,7 +207,7 @@ public:
std::vector<ControlGroupBox*> control_groups;
protected:
ControllerEmu* const controller;
private:
@@ -263,7 +263,7 @@ void InputConfigDialog::UpdateBitmaps(wxTimerEvent& WXUNUSED(event))
}
delete[] bitmasks;
}
break;
case GROUP_TYPE_TRIGGERS :
@@ -101,13 +101,13 @@ void LogConfigWindow::LoadSettings()
// Retrieve the verbosity value from the config ini file.
int verbosity;
ini.Get("Options", "Verbosity", &verbosity, 0);
// Ensure the verbosity level is valid.
if (verbosity < 1)
verbosity = 1;
if (verbosity > MAX_LOGLEVEL)
verbosity = MAX_LOGLEVEL;
// Actually set the logging verbosity.
m_verbosity->SetSelection(verbosity - 1);
@@ -136,10 +136,10 @@ void LogConfigWindow::LoadSettings()
{
bool log_enabled;
ini.Get("Logs", m_LogManager->GetShortName((LogTypes::LOG_TYPE)i), &log_enabled, true);
if (log_enabled)
enableAll = false;
m_checks->Check(i, log_enabled);
}
}
@@ -175,7 +175,7 @@ void LogConfigWindow::OnVerbosityChange(wxCommandEvent& event)
{
// Get the new verbosity
int v = m_verbosity->GetSelection() + 1;
// Set all log types to that verbosity level
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; i++)
{
+6 -6
View File
@@ -51,7 +51,7 @@ void CLogWindow::CreateGUIControls()
// Set up log listeners
int verbosity;
ini.Get("Options", "Verbosity", &verbosity, 0);
// Ensure the verbosity level is valid
if (verbosity < 1)
verbosity = 1;
@@ -305,23 +305,23 @@ void CLogWindow::UpdateLog()
case ERROR_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(*wxRED));
break;
case WARNING_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(wxColour(255, 255, 0))); // YELLOW
break;
case NOTICE_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(*wxGREEN));
break;
case INFO_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(*wxCYAN));
break;
case DEBUG_LEVEL:
m_Log->SetDefaultStyle(wxTextAttr(*wxLIGHT_GREY));
break;
default:
m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE));
break;
+6 -6
View File
@@ -112,11 +112,11 @@ bool DolphinApp::Initialize(int& c, wxChar **v)
{
#if defined HAVE_X11 && HAVE_X11
XInitThreads();
#endif
#endif
return wxApp::Initialize(c, v);
}
// The `main program' equivalent that creates the main window and return the main frame
// The `main program' equivalent that creates the main window and return the main frame
bool DolphinApp::OnInit()
{
@@ -190,7 +190,7 @@ bool DolphinApp::OnInit()
if (parser.Parse() != 0)
{
return false;
}
}
UseDebugger = parser.Found(wxT("debugger"));
UseLogger = parser.Found(wxT("logger"));
@@ -229,7 +229,7 @@ bool DolphinApp::OnInit()
#ifndef _M_ARM
// TODO: if First Boot
if (!cpu_info.bSSE2)
if (!cpu_info.bSSE2)
{
PanicAlertT("Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\n"
"Unfortunately your CPU does not support them, so Dolphin will not run.\n\n"
@@ -321,7 +321,7 @@ bool DolphinApp::OnInit()
int leftPos = GetSystemMetrics(SM_XVIRTUALSCREEN);
int topPos = GetSystemMetrics(SM_YVIRTUALSCREEN);
int width = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
int height = GetSystemMetrics(SM_CYVIRTUALSCREEN);
if ((leftPos + width) < (x + w) || leftPos > x || (topPos + height) < (y + h) || topPos > y)
x = y = wxDefaultCoord;
#elif defined __APPLE__
@@ -456,7 +456,7 @@ void DolphinApp::OnFatalException()
// ------------
// Talk to GUI
void Host_SysMessage(const char *fmt, ...)
void Host_SysMessage(const char *fmt, ...)
{
va_list list;
char msg[512];
+8 -8
View File
@@ -94,8 +94,8 @@ void Host_GetRenderWindowSize(int& x, int& y, int& width, int& height)
{
x = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos;
y = SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos;
width = g_width;
height = g_height;
width = g_width;
height = g_height;
}
void Host_RequestRenderWindowSize(int width, int height) {}
@@ -227,12 +227,12 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_UnPauseEmula
{
PowerPC::Start();
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv *env, jobject obj)
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_PauseEmulation(JNIEnv *env, jobject obj)
{
PowerPC::Pause();
}
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj)
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_StopEmulation(JNIEnv *env, jobject obj)
{
Core::Stop();
updateMainFrameEvent.Set(); // Kick the waiting event
@@ -289,12 +289,12 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig
const char *Key = env->GetStringUTFChars(jKey, NULL);
const char *Value = env->GetStringUTFChars(jValue, NULL);
const char *Default = env->GetStringUTFChars(jDefault, NULL);
ini.Load(File::GetUserPath(D_CONFIG_IDX) + std::string(File));
std::string value;
ini.Get(Key, Value, &value, Default);
env->ReleaseStringUTFChars(jFile, File);
env->ReleaseStringUTFChars(jKey, Key);
env->ReleaseStringUTFChars(jValue, Value);
@@ -309,7 +309,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JN
const char *Key = env->GetStringUTFChars(jKey, NULL);
const char *Value = env->GetStringUTFChars(jValue, NULL);
const char *Default = env->GetStringUTFChars(jDefault, NULL);
ini.Load(File::GetUserPath(D_CONFIG_IDX) + std::string(File));
ini.Set(Key, Value, Default);
+4 -4
View File
@@ -260,7 +260,7 @@ int main(int argc, char* argv[])
{
#ifdef __APPLE__
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSEvent *event = [[NSEvent alloc] init];
NSEvent *event = [[NSEvent alloc] init];
[NSApplication sharedApplication];
[NSApp activateIgnoringOtherApps: YES];
[NSApp finishLaunching];
@@ -313,7 +313,7 @@ int main(int argc, char* argv[])
event = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: [NSDate distantFuture]
inMode: NSDefaultRunLoopMode dequeue: YES];
if ([event type] == NSKeyDown &&
[event modifierFlags] & NSCommandKeyMask &&
[[event characters] UTF8String][0] == 'q')
@@ -321,10 +321,10 @@ int main(int argc, char* argv[])
Core::Stop();
break;
}
if ([event type] != NSKeyDown)
[NSApp sendEvent: event];
}
}
[event release];
[pool release];
+10 -10
View File
@@ -176,7 +176,7 @@ void CMemcardManager::CreateGUIControls()
m_ConvertToGci = new wxButton(this, ID_CONVERTTOGCI, _("Convert to GCI"));
wxStaticBoxSizer *sMemcard[2];
for (int slot = SLOT_A; slot <= SLOT_B; slot++)
{
m_CopyFrom[slot] = new wxButton(this, ID_COPYFROM_A + slot,
@@ -203,10 +203,10 @@ void CMemcardManager::CreateGUIControls()
m_MemcardPath[slot] = new wxFilePickerCtrl(this, ID_MEMCARDPATH_A + slot,
StrToWxStr(File::GetUserPath(D_GCUSER_IDX)), _("Choose a memory card:"),
_("Gamecube Memory Cards (*.raw,*.gcp)") + wxString(wxT("|*.raw;*.gcp")), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400),
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL, mcmSettings);
m_MemcardList[slot]->AssignImageList(new wxImageList(96,32),wxIMAGE_LIST_SMALL);
sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(wxT(" %c"), 'A' + slot));
@@ -499,7 +499,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
{
PanicAlert(E_SAVEFAILED);
}
break;
break;
case ID_CONVERTTOGCI:
fileName2 = "convert";
case ID_SAVEIMPORT_A:
@@ -703,7 +703,7 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card)
auto const string_decoder = memoryCard[card]->IsAsciiEncoding() ?
CP1252ToUTF8 : SHIFTJISToUTF8;
wxTitle = StrToWxStr(string_decoder(title));
wxComment = StrToWxStr(string_decoder(comment));
@@ -711,10 +711,10 @@ bool CMemcardManager::ReloadMemcard(const char *fileName, int card)
m_MemcardList[card]->SetItem(index, COLUMN_COMMENT, wxComment);
blocks = memoryCard[card]->DEntry_BlockCount(fileIndex);
if (blocks == 0xFFFF)
blocks = 0;
wxBlock.Printf(wxT("%10d"), blocks);
m_MemcardList[card]->SetItem(index,COLUMN_BLOCKS, wxBlock);
firstblock = memoryCard[card]->DEntry_FirstBlock(fileIndex);
@@ -777,7 +777,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
long item = HitTest(event.GetPosition(), flags);
wxMenu* popupMenu = new wxMenu;
if (item != wxNOT_FOUND)
if (item != wxNOT_FOUND)
{
if (GetItemState(item, wxLIST_STATE_SELECTED) != wxLIST_STATE_SELECTED)
{
@@ -791,7 +791,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu->Append(ID_SAVEIMPORT_A + slot, _("Import Save"));
popupMenu->Append(ID_SAVEEXPORT_A + slot, _("Export Save"));
popupMenu->Append(ID_EXPORTALL_A + slot, _("Export all saves"));
popupMenu->FindItem(ID_COPYFROM_A + slot)->Enable(__mcmSettings.twoCardsLoaded);
popupMenu->AppendSeparator();
@@ -805,7 +805,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu->FindItem(ID_PREVPAGE_A + slot)->Enable(prevPage && __mcmSettings.usePages);
popupMenu->FindItem(ID_NEXTPAGE_A + slot)->Enable(nextPage && __mcmSettings.usePages);
popupMenu->FindItem(ID_USEPAGES)->Check(__mcmSettings.usePages);
popupMenu->AppendSeparator();
// popupMenu->AppendCheckItem(COLUMN_BANNER, _("Show save banner"));
+3 -3
View File
@@ -103,7 +103,7 @@ class CMemcardManager : public wxDialog
COLUMN_COMMENTSADDRESS,
NUMBER_OF_COLUMN
};
GCMemcard *memoryCard[2];
void CreateGUIControls();
@@ -146,9 +146,9 @@ class CMemcardManager : public wxDialog
bool prevPage,
nextPage;
private:
void OnRightClick(wxMouseEvent& event);
void OnRightClick(wxMouseEvent& event);
};
CMemcardListCtrl *m_MemcardList[2];
};
@@ -40,11 +40,11 @@ void CWiiSaveCrypted::ExportAllSaves()
std::vector<u64> titles;
u32 pathMask = 0x00010000;
for (int i = 0; i < 8; ++i)
{
{
File::FSTEntry FST_Temp;
std::string folder = StringFromFormat("%s/%08x/", titleFolder.c_str(), pathMask | i);
File::ScanDirectoryTree(folder, FST_Temp);
for (auto& entry : FST_Temp.children)
{
if (entry.isDirectory)
@@ -61,7 +61,7 @@ void CWiiSaveCrypted::ExportAllSaves()
}
}
}
}
}
SuccessAlertT("Found %x save files", (unsigned int) titles.size());
for (auto& title : titles)
{
@@ -96,7 +96,7 @@ CWiiSaveCrypted::CWiiSaveCrypted(const char* FileName, u64 TitleID)
else
{
aes_setkey_enc(&m_AES_ctx, SDKey, 128);
if (getPaths(true))
{
b_valid = true;
@@ -133,7 +133,7 @@ void CWiiSaveCrypted::ReadHDR()
}
fpData_bin.Close();
aes_crypt_cbc(&m_AES_ctx, AES_DECRYPT, HEADER_SZ, SD_IV, (const u8*)&_encryptedHeader, (u8*)&_header);
aes_crypt_cbc(&m_AES_ctx, AES_DECRYPT, HEADER_SZ, SD_IV, (const u8*)&_encryptedHeader, (u8*)&_header);
u32 bannerSize = Common::swap32(_header.hdr.BannerSize);
if ((bannerSize < FULL_BNR_MIN) || (bannerSize > FULL_BNR_MAX) ||
(((bannerSize - BNR_SZ) % ICON_SZ) != 0))
@@ -144,7 +144,7 @@ void CWiiSaveCrypted::ReadHDR()
}
m_TitleID = Common::swap64(_header.hdr.SaveGameTitle);
u8 md5_file[16],
md5_calc[16];
memcpy(md5_file, _header.hdr.Md5, 0x10);
@@ -155,11 +155,11 @@ void CWiiSaveCrypted::ReadHDR()
PanicAlertT("MD5 mismatch\n %016llx%016llx != %016llx%016llx", Common::swap64(md5_file),Common::swap64(md5_file+8), Common::swap64(md5_calc), Common::swap64(md5_calc+8));
b_valid= false;
}
if (!getPaths())
{
b_valid = false;
return;
return;
}
std::string BannerFilePath = WiiTitlePath + "banner.bin";
if (!File::Exists(BannerFilePath) || AskYesNoT("%s already exists, overwrite?", BannerFilePath.c_str()))
@@ -198,7 +198,7 @@ void CWiiSaveCrypted::WriteHDR()
memcpy(_header.hdr.Md5, md5_calc, 0x10);
aes_crypt_cbc(&m_AES_ctx, AES_ENCRYPT, HEADER_SZ, SD_IV, (const u8*)&_header, (u8*)&_encryptedHeader);
File::IOFile fpData_bin(encryptedSavePath, "wb");
if (!fpData_bin.WriteBytes(&_encryptedHeader, HEADER_SZ))
{
@@ -212,7 +212,7 @@ void CWiiSaveCrypted::WriteHDR()
void CWiiSaveCrypted::ReadBKHDR()
{
if (!b_valid) return;
File::IOFile fpData_bin(encryptedSavePath, "rb");
if (!fpData_bin)
{
@@ -228,7 +228,7 @@ void CWiiSaveCrypted::ReadBKHDR()
return;
}
fpData_bin.Close();
if (bkhdr.size != Common::swap32(BK_LISTED_SZ) ||
bkhdr.magic != Common::swap32(BK_HDR_MAGIC))
{
@@ -236,11 +236,11 @@ void CWiiSaveCrypted::ReadBKHDR()
b_valid = false;
return;
}
_numberOfFiles = Common::swap32(bkhdr.numberOfFiles);
_sizeOfFiles = Common::swap32(bkhdr.sizeOfFiles);
_totalSize = Common::swap32(bkhdr.totalSize);
if (_sizeOfFiles + FULL_CERT_SZ != _totalSize)
WARN_LOG(CONSOLE, "Size(%x) + cert(%x) does not equal totalsize(%x)", _sizeOfFiles, FULL_CERT_SZ, _totalSize);
if (m_TitleID != Common::swap64(bkhdr.SaveGameTitle))
@@ -252,7 +252,7 @@ void CWiiSaveCrypted::WriteBKHDR()
if (!b_valid) return;
_numberOfFiles = 0;
_sizeOfFiles = 0;
ScanForFiles(WiiTitlePath, FilesList, &_numberOfFiles, &_sizeOfFiles);
memset(&bkhdr, 0, BK_SZ);
bkhdr.size = Common::swap32(BK_LISTED_SZ);
@@ -293,13 +293,13 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
memset(&_tmpFileHDR, 0, FILE_HDR_SZ);
memset(IV, 0, 0x10);
u32 _fileSize = 0;
if (!fpData_bin.ReadBytes(&_tmpFileHDR, FILE_HDR_SZ))
{
PanicAlertT("Failed to read header for file %d", i);
b_valid = false;
}
if (Common::swap32(_tmpFileHDR.magic) != FILE_HDR_MAGIC)
{
PanicAlertT("Bad File Header");
@@ -315,7 +315,7 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
}
std::string fullFilePath = WiiTitlePath + fileName;
File::CreateFullPath(fullFilePath);
File::CreateFullPath(fullFilePath);
if (_tmpFileHDR.type == 1)
{
_fileSize = Common::swap32(_tmpFileHDR.size);
@@ -329,20 +329,20 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
b_valid = false;
break;
}
memcpy(IV, _tmpFileHDR.IV, 0x10);
aes_crypt_cbc(&m_AES_ctx, AES_DECRYPT, RoundedFileSize, IV, (const u8*)&_encryptedData[0], &_data[0]);
aes_crypt_cbc(&m_AES_ctx, AES_DECRYPT, RoundedFileSize, IV, (const u8*)&_encryptedData[0], &_data[0]);
if (!File::Exists(fullFilePath) || AskYesNoT("%s already exists, overwrite?", fullFilePath.c_str()))
{
INFO_LOG(CONSOLE, "Creating file %s", fullFilePath.c_str());
File::IOFile fpRawSaveFile(fullFilePath, "wb");
fpRawSaveFile.WriteBytes(&_data[0], _fileSize);
}
}
}
}
}
}
@@ -355,18 +355,18 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
FileHDR tmpFileHDR;
std::string __name, __ext;
memset(&tmpFileHDR, 0, FILE_HDR_SZ);
u32 _fileSize = 0;
if (File::IsDirectory(FilesList[i]))
{
tmpFileHDR.type = 2;
tmpFileHDR.type = 2;
}
else
{
_fileSize = File::GetSize(FilesList[i]);
tmpFileHDR.type = 1;
}
u32 _roundedfileSize = ROUND_UP(_fileSize, BLOCK_SZ);
tmpFileHDR.magic = Common::swap32(FILE_HDR_MAGIC);
tmpFileHDR.size = Common::swap32(_fileSize);
@@ -374,7 +374,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
__name = FilesList[i].substr(WiiTitlePath.length()+1);
for (Common::replace_v::const_iterator iter = replacements.begin(); iter != replacements.end(); ++iter)
{
for (size_t j = 0; (j = __name.find(iter->second, j)) != __name.npos; ++j)
@@ -382,7 +382,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
__name.replace(j, iter->second.length(), 1, iter->first);
}
}
if (__name.length() > 0x44)
{
PanicAlertT("%s is too long for the filename, max chars is 45", __name.c_str());
@@ -390,7 +390,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
return;
}
strncpy((char *)tmpFileHDR.name, __name.c_str(), __name.length());
{
File::IOFile fpData_bin(encryptedSavePath, "ab");
fpData_bin.WriteBytes(&tmpFileHDR, FILE_HDR_SZ);
@@ -410,7 +410,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
PanicAlertT("%s failed to open", FilesList[i].c_str());
b_valid = false;
}
std::vector<u8> _data,_encryptedData;
_data.reserve(_roundedfileSize);
_encryptedData.reserve(_roundedfileSize);
@@ -422,7 +422,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
}
aes_crypt_cbc(&m_AES_ctx, AES_ENCRYPT, _roundedfileSize, tmpFileHDR.IV, (const u8*)&_data[0], &_encryptedData[0]);
File::IOFile fpData_bin(encryptedSavePath, "ab");
if (!fpData_bin.WriteBytes(&_encryptedData[0], _roundedfileSize))
PanicAlertT("Failed to write data to file: %s", encryptedSavePath.c_str());
@@ -445,7 +445,7 @@ void CWiiSaveCrypted::do_sig()
char name[64];
u8 *data;
u32 data_size;
u32 NG_key_id = 0x6AAB8C59;
u8 NG_priv[30] = { 0, 0xAB, 0xEE, 0xC1, 0xDD, 0xB4, 0xA6, 0x16, 0x6B, 0x70, 0xFD, 0x7E, 0x56, 0x67, 0x70,
@@ -503,7 +503,7 @@ void CWiiSaveCrypted::do_sig()
}
generate_ecdsa(sig, sig + 30, ap_priv, hash);
*(u32*)(sig + 60) = Common::swap32(0x2f536969);
fpData_bin.WriteArray(sig, sizeof(sig));
fpData_bin.WriteArray(ng_cert, sizeof(ng_cert));
fpData_bin.WriteArray(ap_cert, sizeof(ap_cert));
@@ -545,21 +545,21 @@ bool CWiiSaveCrypted::getPaths(bool forExport)
PanicAlertT("No save folder found for title %s", GameID);
return false;
}
if(!File::Exists(WiiTitlePath + "banner.bin"))
{
b_valid = false;
PanicAlertT("No banner file found for title %s", GameID);
return false;
}
if (encryptedSavePath.length() == 0)
if (encryptedSavePath.length() == 0)
encryptedSavePath = "."; // If no path was passed, use current dir
encryptedSavePath += StringFromFormat("/private/wii/title/%s/data.bin", GameID);
File::CreateFullPath(encryptedSavePath);
}
else
{
File::CreateFullPath(WiiTitlePath);
File::CreateFullPath(WiiTitlePath);
if (!AskYesNoT("Warning! it is advised to backup all files in the folder:\n%s\nDo you wish to continue?", WiiTitlePath.c_str()))
return false;
}
@@ -44,7 +44,7 @@ private:
std::string WiiTitlePath;
u8 IV[0x10];
u32 //_bannerSize,
_numberOfFiles,
_sizeOfFiles,
+10 -10
View File
@@ -32,7 +32,7 @@ std::string BuildGameName(const GameListItem& game)
{
// Lang needs to be consistent
auto const lang = 0;
std::string name(game.GetBannerName(lang));
if (name.empty())
name = game.GetVolumeName(lang);
@@ -62,7 +62,7 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl*
// top row
wxStaticText* const nick_lbl = new wxStaticText(panel, wxID_ANY, _("Nickname :"),
wxDefaultPosition, wxDefaultSize);
std::string nickname;
netplay_section.Get("Nickname", &nickname, "Player");
m_nickname_text = new wxTextCtrl(panel, wxID_ANY, StrToWxStr(nickname));
@@ -84,17 +84,17 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl*
{
wxStaticText* const ip_lbl = new wxStaticText(connect_tab, wxID_ANY, _("Address :"),
wxDefaultPosition, wxDefaultSize);
std::string address;
netplay_section.Get("Address", &address, "localhost");
m_connect_ip_text = new wxTextCtrl(connect_tab, wxID_ANY, StrToWxStr(address));
wxStaticText* const port_lbl = new wxStaticText(connect_tab, wxID_ANY, _("Port :"),
wxDefaultPosition, wxDefaultSize);
// string? w/e
std::string port;
netplay_section.Get("ConnectPort", &port, "2626");
netplay_section.Get("ConnectPort", &port, "2626");
m_connect_port_text = new wxTextCtrl(connect_tab, wxID_ANY, StrToWxStr(port));
wxButton* const connect_btn = new wxButton(connect_tab, wxID_ANY, _("Connect"));
@@ -136,10 +136,10 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl*
{
wxStaticText* const port_lbl = new wxStaticText(host_tab, wxID_ANY, _("Port :"),
wxDefaultPosition, wxDefaultSize);
// string? w/e
std::string port;
netplay_section.Get("HostPort", &port, "2626");
netplay_section.Get("HostPort", &port, "2626");
m_host_port_text = new wxTextCtrl(host_tab, wxID_ANY, StrToWxStr(port));
wxButton* const host_btn = new wxButton(host_tab, wxID_ANY, _("Host"));
@@ -147,7 +147,7 @@ NetPlaySetupDiag::NetPlaySetupDiag(wxWindow* const parent, const CGameListCtrl*
m_game_lbox = new wxListBox(host_tab, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxLB_SORT);
m_game_lbox->Bind(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &NetPlaySetupDiag::OnHost, this);
FillWithGameNames(m_game_lbox, *game_list);
wxBoxSizer* const top_szr = new wxBoxSizer(wxHORIZONTAL);
@@ -294,7 +294,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game
m_game_btn = new wxButton(panel, wxID_ANY,
StrToWxStr(m_selected_game).Prepend(_(" Game : ")),
wxDefaultPosition, wxDefaultSize, wxBU_LEFT);
if (is_hosting)
m_game_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &NetPlayDiag::OnChangeGame, this);
else
@@ -422,7 +422,7 @@ std::string NetPlayDiag::FindGame()
for (u32 i = 0 ; auto game = m_game_list->GetISO(i); ++i)
if (m_selected_game == BuildGameName(*game))
return game->GetFileName();
PanicAlertT("Game not found!");
return "";
}
+7 -7
View File
@@ -74,7 +74,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
wxGridBagSizer* sgEntry = new wxGridBagSizer(0, 0);
sgEntry->Add(EditPatchType, wxGBPosition(0, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
sgEntry->Add(EditPatchOffsetText, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sgEntry->Add(EditPatchOffset, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sgEntry->Add(EditPatchOffset, wxGBPosition(1, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sgEntry->Add(EditPatchValueText, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALIGN_CENTER_VERTICAL|wxALL, 5);
sgEntry->Add(EditPatchValue, wxGBPosition(2, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(3, 1), wxEXPAND|wxALL, 5);
@@ -95,7 +95,7 @@ void CPatchAddEdit::ChangeEntry(wxSpinEvent& event)
{
if (!UpdateTempEntryData(itCurEntry))
return;
itCurEntry = tempEntries.end() - event.GetPosition() - 1;
currentItem = (int)tempEntries.size() - event.GetPosition();
UpdateEntryCtrls(*itCurEntry);
@@ -147,9 +147,9 @@ void CPatchAddEdit::AddRemoveEntry(wxCommandEvent& event)
}
break;
case ID_ENTRY_REMOVE:
{
{
itCurEntry = tempEntries.erase(itCurEntry);
if (itCurEntry != tempEntries.begin())
{
--itCurEntry;
@@ -159,8 +159,8 @@ void CPatchAddEdit::AddRemoveEntry(wxCommandEvent& event)
{
EntrySelection->SetValue(EntrySelection->GetValue() - 1);
}
EntrySelection->SetRange(EntrySelection->GetMin(), EntrySelection->GetMax() - 1);
EntrySelection->SetRange(EntrySelection->GetMin(), EntrySelection->GetMax() - 1);
UpdateEntryCtrls(*itCurEntry);
if ((int)tempEntries.size() <= 1)
@@ -193,7 +193,7 @@ bool CPatchAddEdit::UpdateTempEntryData(std::vector<PatchEngine::PatchEntry>::it
else
parsed_ok = false;
PatchEngine::PatchType tempType =
PatchEngine::PatchType tempType =
(*iterEntry).type = (PatchEngine::PatchType)EditPatchType->GetSelection();
if (EditPatchValue->GetValue().ToULong(&value, 16))
+35 -35
View File
@@ -32,7 +32,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
A_turbo = B_turbo = X_turbo = Y_turbo = Z_turbo = L_turbo = R_turbo = START_turbo = DL_turbo = DR_turbo = DD_turbo = DU_turbo = false;
xaxis = yaxis = c_xaxis = c_yaxis = 128;
A_cont = B_cont = X_cont = Y_cont = Z_cont = L_cont = L_button_cont = R_cont = R_button_cont = START_cont = DL_cont = DR_cont = DD_cont = DU_cont = mstickx = msticky = cstickx = csticky = false;
wxBoxSizer* const top_box = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* const bottom_box = new wxBoxSizer(wxHORIZONTAL);
wxStaticBoxSizer* const main_box = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Main Stick"));
@@ -66,7 +66,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wxBoxSizer* const c_xslider_box = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* const c_yslider_box = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* const c_stick_box = new wxBoxSizer(wxVERTICAL);
static_bitmap_c = new wxStaticBitmap(this, ID_C_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize);
static_bitmap_c->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::OnMouseDownL, this);
static_bitmap_c->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseDownL, this);
@@ -90,7 +90,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
c_box->Add(c_yslider_box);
wxStaticBoxSizer* const shoulder_box = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Shoulder Buttons"));
wx_l_s = new wxSlider(this, ID_L_SLIDER, 0, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
wx_l_s->SetMinSize(wxSize(-1,100));
wx_l_t = new wxTextCtrl(this, ID_L_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20));
@@ -99,7 +99,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wx_r_s->SetMinSize(wxSize(-1,100));
wx_r_t = new wxTextCtrl(this, ID_R_TEXT, wxT("0"), wxDefaultPosition, wxSize(40, 20));
wx_r_t->SetMaxLength(3);
shoulder_box->Add(wx_l_s, 0, wxALIGN_CENTER_VERTICAL);
shoulder_box->Add(wx_l_t, 0, wxALIGN_CENTER_VERTICAL);
shoulder_box->Add(wx_r_s, 0, wxALIGN_CENTER_VERTICAL);
@@ -107,7 +107,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wxStaticBoxSizer* const buttons_box = new wxStaticBoxSizer(wxVERTICAL, this, _("Buttons"));
wxGridSizer* const buttons_grid = new wxGridSizer(4);
wx_a_button = new wxCheckBox(this,ID_A,_T("A"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,wxCheckBoxNameStr);
wx_a_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_a_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
@@ -132,7 +132,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wx_start_button = new wxCheckBox(this,ID_START,_T("Start"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,wxCheckBoxNameStr);
wx_start_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_start_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
buttons_grid->Add(wx_a_button,false);
buttons_grid->Add(wx_b_button,false);
buttons_grid->Add(wx_x_button,false);
@@ -144,7 +144,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
buttons_grid->AddSpacer(5);
wxGridSizer* const buttons_dpad = new wxGridSizer(3);
wx_up_button = new wxCheckBox(this,ID_UP,_T("Up"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,wxCheckBoxNameStr);
wx_up_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_up_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
@@ -157,7 +157,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title,
wx_left_button = new wxCheckBox(this,ID_LEFT,_T("Left"),wxDefaultPosition,wxDefaultSize,0,wxDefaultValidator,wxCheckBoxNameStr);
wx_left_button->Bind(wxEVT_RIGHT_DOWN, &TASInputDlg::SetTurbo, this);
wx_left_button->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::SetTurboFalse, this);
buttons_dpad->AddSpacer(20);
buttons_dpad->Add(wx_up_button,false);
buttons_dpad->AddSpacer(20);
@@ -192,21 +192,21 @@ void TASInputDlg::ResetValues()
{
mainX = mainY = cX = cY = 128;
lTrig = rTrig = 0;
wx_mainX_s->SetValue(128);
wx_mainY_s->SetValue(128);
wx_cX_s->SetValue(128);
wx_cY_s->SetValue(128);
wx_l_s->SetValue(0);
wx_r_s->SetValue(0);
wx_mainX_t->SetValue(wxT("128"));
wx_mainY_t->SetValue(wxT("128"));
wx_cX_t->SetValue(wxT("128"));
wx_cY_t->SetValue(wxT("128"));
wx_l_t->SetValue(wxT("0"));
wx_r_t->SetValue(wxT("0"));
wx_up_button->SetValue(false);
wx_down_button->SetValue(false);
wx_left_button->SetValue(false);
@@ -229,7 +229,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
mstickx = true;
wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX));
}
else if(mstickx)
{
mstickx = false;
@@ -308,7 +308,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
wx_left_button->SetValue(false);
DL_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_RIGHT) != 0))
{
wx_right_button->SetValue(true);
@@ -388,7 +388,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
wx_l_t->SetValue(wxT("0"));
L_cont = false;
}
if(((PadStatus->triggerRight) != 0))
{
if (PadStatus->triggerRight == 255)
@@ -424,7 +424,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
wx_z_button->SetValue(false);
Z_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_START) != 0))
{
wx_start_button->SetValue(true);
@@ -454,7 +454,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
{
if (!IsShown())
return;
//TODO:: Make this instant not when polled.
GetKeyBoardInput(PadStatus);
SetLandRTriggers();
@@ -485,7 +485,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
PadStatus->button |= PAD_BUTTON_RIGHT;
else
PadStatus->button &= ~PAD_BUTTON_RIGHT;
if(wx_a_button->IsChecked())
{
PadStatus->button |= PAD_BUTTON_A;
@@ -537,7 +537,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
PadStatus->button |= PAD_TRIGGER_L;
else
PadStatus->button &= ~PAD_TRIGGER_L;
ButtonTurbo();
}
@@ -594,12 +594,12 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
int value = ((wxSlider *) event.GetEventObject())->GetValue();
*v = (u8) value;
text->SetValue(wxString::Format(wxT("%i"), value));
if(update == 1)
{
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis, yaxis));
}
if(update == 2)
{
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis, c_yaxis));
@@ -612,7 +612,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
u8 *v;
update = 0;
update_axis = 0;
switch(event.GetId())
{
case ID_MAIN_X_TEXT:
@@ -639,7 +639,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
case ID_C_Y_TEXT:
slider = wx_cY_s;
v = &cY;
update = 2;
update = 2;
update_axis = 2;
break;
@@ -662,7 +662,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
{
*v = (u8) (value > 255 ? 255 : value);
slider->SetValue(*v);
if(update == 1)
{
if(update_axis == 1)
@@ -670,13 +670,13 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
xaxis = *v;
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
}
if(update_axis == 2)
{
yaxis =256 - *v;
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
}
}
if(update == 2)
@@ -686,13 +686,13 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
c_xaxis = *v;
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
}
if(update_axis == 2)
{
c_yaxis =256- *v;
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
}
}
}
}
@@ -708,7 +708,7 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event)
}
bool TASInputDlg::TASHasFocus()
{
{
//allows numbers to be used as hotkeys
if(TextBoxHasFocus())
return false;
@@ -782,10 +782,10 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
*y = 128;
sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
textX->SetValue(wxString::Format(wxT("%i"), *x));
textY->SetValue(wxString::Format(wxT("%i"), 256 - *y));
sliderX->SetValue(*x);
sliderY->SetValue(256 - *y);
event.Skip(true);
@@ -828,21 +828,21 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
return;
}
wxPoint ptM(event.GetPosition());
wxPoint ptM(event.GetPosition());
*x = ptM.x *2;
*y = ptM.y * 2;
if(*x > 255)
*x = 255;
if(*y > 255)
*y = 255;
sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
textX->SetValue(wxString::Format(wxT("%i"), *x));
textY->SetValue(wxString::Format(wxT("%i"), 256 - *y));
sliderX->SetValue(*x);
sliderY->SetValue(256 - *y);
event.Skip(true);
@@ -915,7 +915,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
{
case ID_A:
placeholder = wx_a_button;
if(A_turbo)
A_turbo = false;
else
+1 -1
View File
@@ -45,7 +45,7 @@ UDPConfigDiag::UDPConfigDiag(wxWindow * const parent, UDPWrapper * _wrp) :
point->SetValue(wrp->updIR);
nun->SetValue(wrp->updNun);
nunaccel->SetValue(wrp->updNunAccel);
sizer1->Add(enable, 1, wxALL | wxEXPAND, 5);
sizer1->Add(port_sizer, 1, wxBOTTOM | wxLEFT| wxRIGHT | wxEXPAND, 5);
@@ -101,7 +101,7 @@ wxString wireframe_desc = wxTRANSLATE("Render the scene as a wireframe.\n\nIf un
wxString disable_fog_desc = wxTRANSLATE("Makes distant objects more visible by removing fog, thus increasing the overall detail.\nDisabling fog will break some games which rely on proper fog emulation.\n\nIf unsure, leave this unchecked.");
wxString disable_dstalpha_desc = wxTRANSLATE("Disables emulation of a hardware feature called destination alpha, which is used in many games for various graphical effects.\n\nIf unsure, leave this unchecked.");
wxString show_fps_desc = wxTRANSLATE("Show the number of frames rendered per second as a measure of emulation speed.\n\nIf unsure, leave this unchecked.");
wxString log_fps_to_file_desc = wxTRANSLATE("Log the number of frames rendered per second to User/Logs/fps.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked.");
wxString log_fps_to_file_desc = wxTRANSLATE("Log the number of frames rendered per second to User/Logs/fps.txt. Use this feature when you want to measure the performance of Dolphin.\n\nIf unsure, leave this unchecked.");
wxString show_input_display_desc = wxTRANSLATE("Display the inputs read by the emulator.\n\nIf unsure, leave this unchecked.");
wxString show_stats_desc = wxTRANSLATE("Show various statistics.\n\nIf unsure, leave this unchecked.");
wxString texfmt_desc = wxTRANSLATE("Modify textures to show the format they're encoded in. Needs an emulation reset in most cases.\n\nIf unsure, leave this unchecked.");
@@ -344,7 +344,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
// Internal resolution
{
const wxString efbscale_choices[] = { _("Auto (Window Size)"), _("Auto (Multiple of 640x528)"),
_("1x Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056)"),
_("1x Native (640x528)"), _("1.5x Native (960x792)"), _("2x Native (1280x1056)"),
_("2.5x Native (1600x1320)"), _("3x Native (1920x1584)"), _("4x Native (2560x2112)") };
wxChoice *const choice_efbscale = CreateChoice(page_enh,
@@ -503,7 +503,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
szr_other->Add(CreateCheckBox(page_hacks, _("OpenMP Texture Decoder"), wxGetTranslation(omp_desc), vconfig.bOMPDecoder));
szr_other->Add(CreateCheckBox(page_hacks, _("Fast Depth Calculation"), wxGetTranslation(fast_depth_calc_desc), vconfig.bFastDepthCalc));
szr_other->Add(hacked_buffer_upload = CreateCheckBox(page_hacks, _("Vertex Streaming Hack"), wxGetTranslation(hacked_buffer_upload_desc), vconfig.bHackedBufferUpload));
wxStaticBoxSizer* const group_other = new wxStaticBoxSizer(wxVERTICAL, page_hacks, _("Other"));
group_other->Add(szr_other, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
szr_hacks->Add(group_other, 0, wxEXPAND | wxALL, 5);
+1 -1
View File
@@ -166,7 +166,7 @@ protected:
// XFB
virtual_xfb->Enable(vconfig.bUseXFB);
real_xfb->Enable(vconfig.bUseXFB);
// OGL Hacked buffer
hacked_buffer_upload->Enable(Core::GetState() == Core::CORE_UNINITIALIZED && vconfig.backend_info.APIType == API_OPENGL);
hacked_buffer_upload->Show(vconfig.backend_info.APIType == API_OPENGL);
+13 -13
View File
@@ -54,8 +54,8 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin
wiimote_sizer->Add(wiimote_configure_bt[i]);
}
wiimote_group->Add(wiimote_sizer, 1, wxEXPAND, 5 );
// "BalanceBoard" layout
wxStaticBoxSizer* const bb_group = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Balance Board"));
wxFlexGridSizer* const bb_sizer = new wxFlexGridSizer(1, 5, 5);
@@ -64,27 +64,27 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin
const wxString src_choices[] = { _("None"), _("Real Balance Board") };
wxChoice* bb_source = new wxChoice(this, source_ctrl_id, wxDefaultPosition, wxDefaultSize, sizeof(src_choices)/sizeof(*src_choices), src_choices);
bb_source->Bind(wxEVT_COMMAND_CHOICE_SELECTED, &WiimoteConfigDiag::SelectSource, this);
m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] = g_wiimote_sources[WIIMOTE_BALANCE_BOARD];
bb_source->Select(m_orig_wiimote_sources[WIIMOTE_BALANCE_BOARD] ? 1 : 0);
bb_sizer->Add(bb_source, 0, wxALIGN_CENTER_VERTICAL);
bb_group->Add(bb_sizer, 1, wxEXPAND, 5 );
// "Real wiimotes" controls
wxButton* const refresh_btn = new wxButton(this, -1, _("Refresh"), wxDefaultPosition);
refresh_btn->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &WiimoteConfigDiag::RefreshRealWiimotes, this);
wxStaticBoxSizer* const real_wiimotes_group = new wxStaticBoxSizer(wxVERTICAL, this, _("Real Wiimotes"));
wxBoxSizer* const real_wiimotes_sizer = new wxBoxSizer(wxHORIZONTAL);
if (!WiimoteReal::g_wiimote_scanner.IsReady())
real_wiimotes_group->Add(new wxStaticText(this, -1, _("A supported bluetooth device could not be found.\n"
"You must manually connect your wiimotes.")), 0, wxALIGN_CENTER | wxALL, 5);
wxCheckBox* const continuous_scanning = new wxCheckBox(this, wxID_ANY, _("Continuous Scanning"));
continuous_scanning->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &WiimoteConfigDiag::OnContinuousScanning, this);
continuous_scanning->SetValue(SConfig::GetInstance().m_WiimoteContinuousScanning);
@@ -92,7 +92,7 @@ WiimoteConfigDiag::WiimoteConfigDiag(wxWindow* const parent, InputPlugin& plugin
auto wiimote_speaker = new wxCheckBox(this, wxID_ANY, _("Enable Speaker Data"));
wiimote_speaker->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &WiimoteConfigDiag::OnEnableSpeaker, this);
wiimote_speaker->SetValue(SConfig::GetInstance().m_WiimoteEnableSpeaker);
real_wiimotes_sizer->Add(continuous_scanning, 0, wxALIGN_CENTER_VERTICAL);
real_wiimotes_sizer->AddStretchSpacer(1);
real_wiimotes_sizer->Add(refresh_btn, 0, wxALL | wxALIGN_CENTER, 5);
@@ -209,7 +209,7 @@ void WiimoteConfigDiag::SelectSource(wxCommandEvent& event)
// This needs to be changed now in order for refresh to work right.
// Revert if the dialog is canceled.
int index = m_wiimote_index_from_ctrl_id[event.GetId()];
if(index != WIIMOTE_BALANCE_BOARD)
{
WiimoteReal::ChangeWiimoteSource(index, event.GetInt());
@@ -220,7 +220,7 @@ void WiimoteConfigDiag::SelectSource(wxCommandEvent& event)
}
else
{
WiimoteReal::ChangeWiimoteSource(index, event.GetInt() ? WIIMOTE_SRC_REAL : WIIMOTE_SRC_NONE);
WiimoteReal::ChangeWiimoteSource(index, event.GetInt() ? WIIMOTE_SRC_REAL : WIIMOTE_SRC_NONE);
}
}
@@ -245,7 +245,7 @@ void WiimoteConfigDiag::Save(wxCommandEvent& event)
sec.Set("Source", (int)g_wiimote_sources[i]);
}
std::string secname("BalanceBoard");
IniFile::Section& sec = *inifile.GetOrCreateSection(secname.c_str());
sec.Set("Source", (int)g_wiimote_sources[WIIMOTE_BALANCE_BOARD]);
+1 -1
View File
@@ -166,7 +166,7 @@ void XRRConfiguration::Update()
{
if(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
return;
if (!bValid)
return;
+1 -1
View File
@@ -5,7 +5,7 @@
#define IDI_ICON1 101
// Next default values for new objects
//
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
File diff suppressed because it is too large Load Diff