mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Formatting/Whitespace Cleanup
Various fixes to formatting and whitespace
This commit is contained in:
@ -64,15 +64,15 @@ CARCodeAddEdit::CARCodeAddEdit(int _selection, wxWindow* parent, wxWindowID id,
|
||||
EditCheatCode = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(300, 100), wxTE_MULTILINE);
|
||||
UpdateTextCtrl(tempEntries);
|
||||
|
||||
sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER|wxALL, 5);
|
||||
sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND|wxALL, 5);
|
||||
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND|wxALL, 5);
|
||||
sgEntry->Add(EditCheatCode, wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND|wxALL, 5);
|
||||
sgEntry->Add(EditCheatNameText, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALIGN_CENTER | wxALL, 5);
|
||||
sgEntry->Add(EditCheatName, wxGBPosition(0, 1), wxGBSpan(1, 1), wxEXPAND | wxALL, 5);
|
||||
sgEntry->Add(EntrySelection, wxGBPosition(0, 2), wxGBSpan(2, 1), wxEXPAND | wxALL, 5);
|
||||
sgEntry->Add(EditCheatCode, wxGBPosition(1, 0), wxGBSpan(1, 2), wxEXPAND | wxALL, 5);
|
||||
sgEntry->AddGrowableCol(1);
|
||||
sgEntry->AddGrowableRow(1);
|
||||
sbEntry->Add(sgEntry, 1, wxEXPAND|wxALL);
|
||||
sbEntry->Add(sgEntry, 1, wxEXPAND | wxALL);
|
||||
|
||||
sEditCheat->Add(sbEntry, 1, wxEXPAND|wxALL, 5);
|
||||
sEditCheat->Add(sbEntry, 1, wxEXPAND | wxALL, 5);
|
||||
sEditCheat->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizerAndFit(sEditCheat);
|
||||
@ -86,7 +86,7 @@ void CARCodeAddEdit::ChangeEntry(wxSpinEvent& event)
|
||||
UpdateTextCtrl(currentCode);
|
||||
}
|
||||
|
||||
void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED (event))
|
||||
void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
std::vector<ActionReplay::AREntry> decryptedLines;
|
||||
std::vector<std::string> encryptedLines;
|
||||
@ -95,7 +95,7 @@ void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED (event))
|
||||
std::vector<std::string> userInputLines;
|
||||
SplitString(WxStrToStr(EditCheatCode->GetValue()), '\n', userInputLines);
|
||||
|
||||
for (size_t i = 0; i < userInputLines.size(); i++)
|
||||
for (size_t i = 0; i < userInputLines.size(); i++)
|
||||
{
|
||||
// Make sure to ignore unneeded whitespace characters.
|
||||
std::string line_str = StripSpaces(userInputLines[i]);
|
||||
@ -131,7 +131,7 @@ void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED (event))
|
||||
// If the above-mentioned conditions weren't met, then something went wrong.
|
||||
if (!PanicYesNoT("Unable to parse line %u of the entered AR code as a valid "
|
||||
"encrypted or decrypted code. Make sure you typed it correctly.\n"
|
||||
"Would you like to ignore this line and continue parsing?", (unsigned) (i + 1)))
|
||||
"Would you like to ignore this line and continue parsing?", (unsigned)(i + 1)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -15,11 +15,11 @@ class wxWindow;
|
||||
|
||||
class AboutDolphin : public wxDialog
|
||||
{
|
||||
public:
|
||||
AboutDolphin(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = _("About Dolphin"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
public:
|
||||
AboutDolphin(wxWindow *parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString &title = _("About Dolphin"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
};
|
||||
|
@ -42,7 +42,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
|
||||
m_btn_next_scan->Disable();
|
||||
|
||||
// data sizes radiobox
|
||||
std::array<wxString, 3> data_size_names = {{ _("8-bit"), _("16-bit"), _("32-bit") }};
|
||||
std::array<wxString, 3> data_size_names = { { _("8-bit"), _("16-bit"), _("32-bit") } };
|
||||
m_data_sizes = new wxRadioBox(this, wxID_ANY, _("Data Size"), wxDefaultPosition, wxDefaultSize, static_cast<int>(data_size_names.size()), data_size_names.data());
|
||||
|
||||
// Listbox for search results (shown in monospace font).
|
||||
@ -111,7 +111,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
|
||||
|
||||
// right sizer
|
||||
wxBoxSizer* const sizer_right = new wxBoxSizer(wxVERTICAL);
|
||||
sizer_right->Add(m_data_sizes, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
sizer_right->Add(m_data_sizes, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
sizer_right->Add(sizer_cheat_search_filter, 0, wxEXPAND | wxBOTTOM, 5);
|
||||
sizer_right->AddStretchSpacer(1);
|
||||
sizer_right->Add(boxButtons, 0, wxTOP | wxEXPAND, 5);
|
||||
@ -124,7 +124,7 @@ CheatSearchTab::CheatSearchTab(wxWindow* const parent)
|
||||
SetSizerAndFit(sizer_main);
|
||||
}
|
||||
|
||||
void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
||||
void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
const u8* const memptr = Memory::m_pRAM;
|
||||
if (memptr == nullptr)
|
||||
@ -174,7 +174,7 @@ void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
||||
// 2 : greater-than
|
||||
// 4 : less-than
|
||||
|
||||
const int filters[] = {7, 6, 1, 2, 4};
|
||||
const int filters[] = { 7, 6, 1, 2, 4 };
|
||||
int filter_mask = filters[m_search_type->GetSelection()];
|
||||
|
||||
if (m_value_x_radiobtn.rad_oldvalue->GetValue()) // using old value comparison
|
||||
@ -182,7 +182,7 @@ void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
||||
for (CheatSearchResult& result : m_search_results)
|
||||
{
|
||||
// with big endian, can just use memcmp for ><= comparison
|
||||
int cmp_result = memcmp(memptr + result.address, &result.old_value,m_search_type_size);
|
||||
int cmp_result = memcmp(memptr + result.address, &result.old_value, m_search_type_size);
|
||||
if (cmp_result < 0)
|
||||
cmp_result = 4;
|
||||
else
|
||||
@ -216,12 +216,12 @@ void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
||||
// #ifdef LIL_ENDIAN :p
|
||||
switch (m_search_type_size)
|
||||
{
|
||||
case 1 :
|
||||
case 1:
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
*(u16*)&user_x_val = Common::swap16((u8*)&user_x_val);
|
||||
break;
|
||||
case 4 :
|
||||
case 4:
|
||||
user_x_val = Common::swap32(user_x_val);
|
||||
break;
|
||||
}
|
||||
@ -279,12 +279,12 @@ void CheatSearchTab::UpdateCheatSearchResultsList()
|
||||
// #ifdef LIL_ENDIAN :p
|
||||
switch (m_search_type_size)
|
||||
{
|
||||
case 1 :
|
||||
case 1:
|
||||
break;
|
||||
case 2 :
|
||||
case 2:
|
||||
*(u16*)&display_value = Common::swap16((u8*)&display_value);
|
||||
break;
|
||||
case 4 :
|
||||
case 4:
|
||||
display_value = Common::swap32(display_value);
|
||||
break;
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ private:
|
||||
{
|
||||
wxRadioButton* rad_oldvalue;
|
||||
wxRadioButton* rad_uservalue;
|
||||
|
||||
} m_value_x_radiobtn;
|
||||
|
||||
void UpdateCheatSearchResultsList();
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "DolphinWX/Cheats/GeckoCodeDiag.h"
|
||||
|
||||
wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
|
||||
: wxDialog(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxDIALOG_NO_PARENT)
|
||||
: wxDialog(parent, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX | wxDIALOG_NO_PARENT)
|
||||
{
|
||||
// Create the GUI controls
|
||||
Init_ChildControls();
|
||||
@ -109,12 +109,12 @@ void wxCheatsWindow::Init_ChildControls()
|
||||
m_textctrl_log = new wxTextCtrl(m_tab_log, wxID_ANY, "", wxDefaultPosition, wxSize(100, -1), wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
|
||||
|
||||
wxBoxSizer *HStrip1 = new wxBoxSizer(wxHORIZONTAL);
|
||||
HStrip1->Add(m_checkbox_log_ar, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
|
||||
HStrip1->Add(m_checkbox_log_ar, 0, wxALL | wxALIGN_CENTER_VERTICAL, 5);
|
||||
HStrip1->Add(button_updatelog, 0, wxALL, 5);
|
||||
|
||||
wxBoxSizer *sTabLog = new wxBoxSizer(wxVERTICAL);
|
||||
sTabLog->Add(HStrip1, 0, wxALL, 5);
|
||||
sTabLog->Add(m_textctrl_log, 1, wxALL|wxEXPAND, 5);
|
||||
sTabLog->Add(m_textctrl_log, 1, wxALL | wxEXPAND, 5);
|
||||
|
||||
m_tab_log->SetSizerAndFit(sTabLog);
|
||||
|
||||
@ -140,12 +140,12 @@ void wxCheatsWindow::Init_ChildControls()
|
||||
sButtons->Realize();
|
||||
|
||||
wxBoxSizer* const sMain = new wxBoxSizer(wxVERTICAL);
|
||||
sMain->Add(m_notebook_main, 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(m_notebook_main, 1, wxEXPAND | wxALL, 5);
|
||||
sMain->Add(sButtons, 0, wxRIGHT | wxBOTTOM | wxALIGN_RIGHT, 5);
|
||||
SetSizerAndFit(sMain);
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_ButtonClose_Press(wxCommandEvent& WXUNUSED (event))
|
||||
void wxCheatsWindow::OnEvent_ButtonClose_Press(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close();
|
||||
}
|
||||
@ -206,7 +206,7 @@ void wxCheatsWindow::Load_GeckoCodes()
|
||||
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID(), true);
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (event))
|
||||
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
using namespace ActionReplay;
|
||||
|
||||
@ -231,7 +231,7 @@ void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (e
|
||||
}
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_CheatsList_ItemToggled(wxCommandEvent& WXUNUSED (event))
|
||||
void wxCheatsWindow::OnEvent_CheatsList_ItemToggled(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
int index = m_checklistbox_cheats_list->GetSelection();
|
||||
for (const ARCodeIndex& code_index : m_index_list)
|
||||
@ -269,7 +269,7 @@ void wxCheatsWindow::OnEvent_ApplyChanges_Press(wxCommandEvent& ev)
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_ButtonUpdateLog_Press(wxCommandEvent& WXUNUSED (event))
|
||||
void wxCheatsWindow::OnEvent_ButtonUpdateLog_Press(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_textctrl_log->Clear();
|
||||
for (const std::string& text : ActionReplay::GetSelfLog())
|
||||
@ -278,7 +278,7 @@ void wxCheatsWindow::OnEvent_ButtonUpdateLog_Press(wxCommandEvent& WXUNUSED (eve
|
||||
}
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& WXUNUSED (event))
|
||||
void wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
ActionReplay::EnableSelfLogging(m_checkbox_log_ar->IsChecked());
|
||||
}
|
||||
|
@ -629,7 +629,7 @@ void CConfigMain::CreateGUIControls()
|
||||
// Audio page
|
||||
DSPEngine = new wxRadioBox(AudioPage, ID_DSPENGINE, _("DSP Emulator Engine"), wxDefaultPosition, wxDefaultSize, arrayStringFor_DSPEngine, 0, wxRA_SPECIFY_ROWS);
|
||||
DPL2Decoder = new wxCheckBox(AudioPage, ID_DPL2DECODER, _("Dolby Pro Logic II decoder"));
|
||||
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL|wxSL_INVERSE);
|
||||
VolumeSlider = new wxSlider(AudioPage, ID_VOLUME, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
|
||||
VolumeText = new wxStaticText(AudioPage, wxID_ANY, "");
|
||||
BackendSelection = new wxChoice(AudioPage, ID_BACKEND, wxDefaultPosition, wxDefaultSize, wxArrayBackends, 0, wxDefaultValidator, wxEmptyString);
|
||||
Latency = new wxSpinCtrl(AudioPage, ID_LATENCY, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 30);
|
||||
@ -649,24 +649,24 @@ void CConfigMain::CreateGUIControls()
|
||||
sbAudioSettings->Add(DPL2Decoder, 0, wxALL, 5);
|
||||
|
||||
wxStaticBoxSizer *sbVolume = new wxStaticBoxSizer(wxVERTICAL, AudioPage, _("Volume"));
|
||||
sbVolume->Add(VolumeSlider, 1, wxLEFT|wxRIGHT, 13);
|
||||
sbVolume->Add(VolumeText, 0, wxALIGN_CENTER|wxALL, 5);
|
||||
sbVolume->Add(VolumeSlider, 1, wxLEFT | wxRIGHT, 13);
|
||||
sbVolume->Add(VolumeText, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
wxGridBagSizer *sBackend = new wxGridBagSizer();
|
||||
sBackend->Add(TEXT_BOX(AudioPage, _("Audio Backend:")), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sBackend->Add(TEXT_BOX(AudioPage, _("Audio Backend:")), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sBackend->Add(BackendSelection, wxGBPosition(0, 1), wxDefaultSpan, wxALL, 5);
|
||||
sBackend->Add(TEXT_BOX(AudioPage, _("Latency:")), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sBackend->Add(TEXT_BOX(AudioPage, _("Latency:")), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sBackend->Add(Latency, wxGBPosition(1, 1), wxDefaultSpan, wxALL, 5);
|
||||
wxStaticBoxSizer *sbBackend = new wxStaticBoxSizer(wxHORIZONTAL, AudioPage, _("Backend Settings"));
|
||||
sbBackend->Add(sBackend, 0, wxEXPAND);
|
||||
|
||||
wxBoxSizer *sAudio = new wxBoxSizer(wxHORIZONTAL);
|
||||
sAudio->Add(sbAudioSettings, 1, wxEXPAND|wxALL, 5);
|
||||
sAudio->Add(sbVolume, 0, wxEXPAND|wxALL, 5);
|
||||
sAudio->Add(sbAudioSettings, 1, wxEXPAND | wxALL, 5);
|
||||
sAudio->Add(sbVolume, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
sAudioPage = new wxBoxSizer(wxVERTICAL);
|
||||
sAudioPage->Add(sAudio, 0, wxALL|wxEXPAND);
|
||||
sAudioPage->Add(sbBackend, 0, wxALL|wxEXPAND, 5);
|
||||
sAudioPage->Add(sAudio, 0, wxALL | wxEXPAND);
|
||||
sAudioPage->Add(sbBackend, 0, wxALL | wxEXPAND, 5);
|
||||
AudioPage->SetSizerAndFit(sAudioPage);
|
||||
|
||||
|
||||
@ -704,8 +704,8 @@ void CConfigMain::CreateGUIControls()
|
||||
sGamecubeIPLSettings = new wxGridBagSizer();
|
||||
sGamecubeIPLSettings->Add(GCAlwaysHLE_BS2, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sGamecubeIPLSettings->Add(TEXT_BOX(GamecubePage, _("System Language:")),
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
sGamecubeIPLSettings->Add(GCSystemLang, wxGBPosition(1, 1), wxDefaultSpan, wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
sGamecubeIPLSettings->Add(GCSystemLang, wxGBPosition(1, 1), wxDefaultSpan, wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
|
||||
sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, GamecubePage, _("IPL Settings"));
|
||||
sbGamecubeIPLSettings->Add(sGamecubeIPLSettings);
|
||||
@ -714,16 +714,17 @@ void CConfigMain::CreateGUIControls()
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
sbGamecubeEXIDevSettings->Add(GCEXIDeviceText[i], wxGBPosition(i, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
|
||||
sbGamecubeEXIDevSettings->Add(GCEXIDevice[i], wxGBPosition(i, 1), wxGBSpan(1, (i < 2)?1:2), wxALIGN_CENTER_VERTICAL);
|
||||
if (i < 2) sbGamecubeEXIDevSettings->Add(GCMemcardPath[i], wxGBPosition(i, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
|
||||
sbGamecubeEXIDevSettings->Add(GCEXIDevice[i], wxGBPosition(i, 1), wxGBSpan(1, (i < 2) ? 1 : 2), wxALIGN_CENTER_VERTICAL);
|
||||
if (i < 2)
|
||||
sbGamecubeEXIDevSettings->Add(GCMemcardPath[i], wxGBPosition(i, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
|
||||
if (NetPlay::IsNetPlayRunning())
|
||||
GCEXIDevice[i]->Disable();
|
||||
}
|
||||
sbGamecubeDeviceSettings->Add(sbGamecubeEXIDevSettings, 0, wxALL, 5);
|
||||
|
||||
sGamecubePage = new wxBoxSizer(wxVERTICAL);
|
||||
sGamecubePage->Add(sbGamecubeIPLSettings, 0, wxEXPAND|wxALL, 5);
|
||||
sGamecubePage->Add(sbGamecubeDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
||||
sGamecubePage->Add(sbGamecubeIPLSettings, 0, wxEXPAND | wxALL, 5);
|
||||
sGamecubePage->Add(sbGamecubeDeviceSettings, 0, wxEXPAND | wxALL, 5);
|
||||
GamecubePage->SetSizer(sGamecubePage);
|
||||
|
||||
// Wii page
|
||||
@ -742,10 +743,10 @@ void CConfigMain::CreateGUIControls()
|
||||
sWiiIPLSettings->Add(WiiScreenSaver, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sWiiIPLSettings->Add(WiiPAL60, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sWiiIPLSettings->Add(TEXT_BOX(WiiPage, _("Aspect Ratio:")),
|
||||
wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sWiiIPLSettings->Add(WiiAspectRatio, wxGBPosition(2, 1), wxDefaultSpan, wxALL, 5);
|
||||
sWiiIPLSettings->Add(TEXT_BOX(WiiPage, _("System Language:")),
|
||||
wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sWiiIPLSettings->Add(WiiSystemLang, wxGBPosition(3, 1), wxDefaultSpan, wxALL, 5);
|
||||
sbWiiIPLSettings = new wxStaticBoxSizer(wxVERTICAL, WiiPage, _("Misc Settings"));
|
||||
sbWiiIPLSettings->Add(sWiiIPLSettings);
|
||||
@ -755,8 +756,8 @@ void CConfigMain::CreateGUIControls()
|
||||
sbWiiDeviceSettings->Add(WiiKeyboard, 0, wxALL, 5);
|
||||
|
||||
sWiiPage = new wxBoxSizer(wxVERTICAL);
|
||||
sWiiPage->Add(sbWiiIPLSettings, 0, wxEXPAND|wxALL, 5);
|
||||
sWiiPage->Add(sbWiiDeviceSettings, 0, wxEXPAND|wxALL, 5);
|
||||
sWiiPage->Add(sbWiiIPLSettings, 0, wxEXPAND | wxALL, 5);
|
||||
sWiiPage->Add(sbWiiDeviceSettings, 0, wxEXPAND | wxALL, 5);
|
||||
WiiPage->SetSizer(sWiiPage);
|
||||
|
||||
|
||||
@ -769,46 +770,46 @@ void CConfigMain::CreateGUIControls()
|
||||
|
||||
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, _("Choose a default ISO:"),
|
||||
_("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad|%s", wxGetTranslation(wxALL_FILES)),
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN);
|
||||
DVDRoot = new wxDirPickerCtrl(PathsPage, ID_DVDROOT, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
||||
ApploaderPath = new wxFilePickerCtrl(PathsPage, ID_APPLOADERPATH, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"),
|
||||
_("apploader (.img)") + wxString::Format("|*.img|%s", wxGetTranslation(wxALL_FILES)),
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN);
|
||||
NANDRoot = new wxDirPickerCtrl(PathsPage, ID_NANDROOT, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
||||
|
||||
// Populate the settings
|
||||
wxBoxSizer* sISOButtons = new wxBoxSizer(wxHORIZONTAL);
|
||||
sISOButtons->Add(RecursiveISOPath, 0, wxALL|wxALIGN_CENTER, 0);
|
||||
sISOButtons->Add(RecursiveISOPath, 0, wxALL | wxALIGN_CENTER, 0);
|
||||
sISOButtons->AddStretchSpacer();
|
||||
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
|
||||
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
|
||||
sbISOPaths = new wxStaticBoxSizer(wxVERTICAL, PathsPage, _("ISO Directories"));
|
||||
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
|
||||
sbISOPaths->Add(sISOButtons, 0, wxEXPAND|wxALL, 5);
|
||||
sbISOPaths->Add(ISOPaths, 1, wxEXPAND | wxALL, 0);
|
||||
sbISOPaths->Add(sISOButtons, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
sOtherPaths = new wxGridBagSizer();
|
||||
sOtherPaths->Add(TEXT_BOX(PathsPage, _("Default ISO:")),
|
||||
wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sOtherPaths->Add(DefaultISO, wxGBPosition(0, 1), wxDefaultSpan, wxEXPAND|wxALL, 5);
|
||||
wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sOtherPaths->Add(DefaultISO, wxGBPosition(0, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
sOtherPaths->Add(TEXT_BOX(PathsPage, _("DVD Root:")),
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sOtherPaths->Add(DVDRoot, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND|wxALL, 5);
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sOtherPaths->Add(DVDRoot, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
sOtherPaths->Add(TEXT_BOX(PathsPage, _("Apploader:")),
|
||||
wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sOtherPaths->Add(ApploaderPath, wxGBPosition(2, 1), wxDefaultSpan, wxEXPAND|wxALL, 5);
|
||||
wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sOtherPaths->Add(ApploaderPath, wxGBPosition(2, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
sOtherPaths->Add(TEXT_BOX(PathsPage, _("Wii NAND Root:")),
|
||||
wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sOtherPaths->Add(NANDRoot, wxGBPosition(3, 1), wxDefaultSpan, wxEXPAND|wxALL, 5);
|
||||
wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sOtherPaths->Add(NANDRoot, wxGBPosition(3, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
sOtherPaths->AddGrowableCol(1);
|
||||
|
||||
// Populate the Paths page
|
||||
sPathsPage = new wxBoxSizer(wxVERTICAL);
|
||||
sPathsPage->Add(sbISOPaths, 1, wxEXPAND|wxALL, 5);
|
||||
sPathsPage->Add(sOtherPaths, 0, wxEXPAND|wxALL, 5);
|
||||
sPathsPage->Add(sbISOPaths, 1, wxEXPAND | wxALL, 5);
|
||||
sPathsPage->Add(sOtherPaths, 0, wxEXPAND | wxALL, 5);
|
||||
PathsPage->SetSizer(sPathsPage);
|
||||
|
||||
wxBoxSizer* sMain = new wxBoxSizer(wxVERTICAL);
|
||||
sMain->Add(Notebook, 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(Notebook, 1, wxEXPAND | wxALL, 5);
|
||||
sMain->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
|
||||
wxStaticBoxSizer* sbCPUOptions = new wxStaticBoxSizer(wxVERTICAL, AdvancedPage, _("CPU Options"));
|
||||
@ -848,12 +849,12 @@ void CConfigMain::CreateGUIControls()
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
void CConfigMain::OnClose(wxCloseEvent& WXUNUSED (event))
|
||||
void CConfigMain::OnClose(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
EndModal((bRefreshList) ? wxID_OK : wxID_CANCEL);
|
||||
}
|
||||
|
||||
void CConfigMain::OnOk(wxCommandEvent& WXUNUSED (event))
|
||||
void CConfigMain::OnOk(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close();
|
||||
|
||||
@ -1100,7 +1101,7 @@ void CConfigMain::ChooseSlotPath(bool isSlotA, TEXIDevices device_type)
|
||||
if (!memorycard.IsValid())
|
||||
{
|
||||
WxUtils::ShowErrorDialog(wxString::Format(_("Cannot use that file as a memory card.\n%s\n" \
|
||||
"is not a valid gamecube memory card file"), filename.c_str()));
|
||||
"is not a valid GameCube memory card file"), filename.c_str()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1239,7 +1240,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
|
||||
|
||||
// Paths settings
|
||||
// -------------------
|
||||
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED (event))
|
||||
void CConfigMain::ISOPathsSelectionChanged(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
RemoveISOPath->Enable(ISOPaths->GetSelection() != wxNOT_FOUND);
|
||||
}
|
||||
@ -1282,28 +1283,28 @@ void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
|
||||
SConfig::GetInstance().m_ISOFolder.push_back(WxStrToStr(ISOPaths->GetStrings()[i]));
|
||||
}
|
||||
|
||||
void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED (event))
|
||||
void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
SConfig::GetInstance().m_RecursiveISOFolder = RecursiveISOPath->IsChecked();
|
||||
bRefreshList = true;
|
||||
}
|
||||
|
||||
void CConfigMain::DefaultISOChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
void CConfigMain::DefaultISOChanged(wxFileDirPickerEvent& WXUNUSED(event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = WxStrToStr(DefaultISO->GetPath());
|
||||
}
|
||||
|
||||
void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
void CConfigMain::DVDRootChanged(wxFileDirPickerEvent& WXUNUSED(event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = WxStrToStr(DVDRoot->GetPath());
|
||||
}
|
||||
|
||||
void CConfigMain::ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
void CConfigMain::ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED(event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strApploader = WxStrToStr(ApploaderPath->GetPath());
|
||||
}
|
||||
|
||||
void CConfigMain::NANDRootChanged(wxFileDirPickerEvent& WXUNUSED (event))
|
||||
void CConfigMain::NANDRootChanged(wxFileDirPickerEvent& WXUNUSED(event))
|
||||
{
|
||||
std::string NANDPath =
|
||||
SConfig::GetInstance().m_NANDPath =
|
||||
|
@ -266,7 +266,7 @@ private:
|
||||
void AddRemoveISOPaths(wxCommandEvent& event);
|
||||
void DefaultISOChanged(wxFileDirPickerEvent& event);
|
||||
void DVDRootChanged(wxFileDirPickerEvent& event);
|
||||
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED (event));
|
||||
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED(event));
|
||||
void NANDRootChanged(wxFileDirPickerEvent& event);
|
||||
|
||||
private:
|
||||
|
@ -115,7 +115,7 @@ void FifoPlayerDlg::CreateGUIControls()
|
||||
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);
|
||||
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);
|
||||
@ -475,9 +475,9 @@ void FifoPlayerDlg::OnBeginSearch(wxCommandEvent& event)
|
||||
}
|
||||
|
||||
const u8* const start_ptr = &fifo_frame.fifoData[frame.objectStarts[obj_idx]];
|
||||
const u8* const end_ptr = &fifo_frame.fifoData[frame.objectStarts[obj_idx+1]];
|
||||
const u8* const end_ptr = &fifo_frame.fifoData[frame.objectStarts[obj_idx + 1]];
|
||||
|
||||
for (const u8* ptr = start_ptr; ptr < end_ptr-val_length+1; ++ptr)
|
||||
for (const u8* ptr = start_ptr; ptr < end_ptr - val_length + 1; ++ptr)
|
||||
{
|
||||
if (std::equal(search_val.begin(), search_val.end(), ptr))
|
||||
{
|
||||
@ -490,7 +490,7 @@ void FifoPlayerDlg::OnBeginSearch(wxCommandEvent& event)
|
||||
{
|
||||
if (ptr < start_ptr + m_objectCmdOffsets[cmd_idx])
|
||||
{
|
||||
result.cmd_idx = cmd_idx-1;
|
||||
result.cmd_idx = cmd_idx - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -540,7 +540,7 @@ void FifoPlayerDlg::OnFindPreviousClick(wxCommandEvent& event)
|
||||
{
|
||||
if (it->cmd_idx < cur_cmd_index)
|
||||
{
|
||||
ChangeSearchResult(search_results.size()-1 - (it - search_results.rbegin()));
|
||||
ChangeSearchResult(search_results.size() - 1 - (it - search_results.rbegin()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -575,7 +575,7 @@ void FifoPlayerDlg::ChangeSearchResult(unsigned int result_idx)
|
||||
OnObjectCmdListSelectionChanged(ev);
|
||||
}
|
||||
|
||||
m_findNext->Enable(result_idx+1 < search_results.size());
|
||||
m_findNext->Enable(result_idx + 1 < search_results.size());
|
||||
m_findPrevious->Enable(result_idx != 0);
|
||||
}
|
||||
else if (search_results.size())
|
||||
@ -747,7 +747,7 @@ void FifoPlayerDlg::OnObjectListSelectionChanged(wxCommandEvent& event)
|
||||
void FifoPlayerDlg::OnObjectCmdListSelectionChanged(wxCommandEvent& event)
|
||||
{
|
||||
const int frame_idx = m_framesList->GetSelection();
|
||||
const int object_idx = m_objectsList->GetSelection();
|
||||
const int object_idx = m_objectsList->GetSelection();
|
||||
|
||||
if (event.GetInt() == -1 || frame_idx == -1 || object_idx == -1)
|
||||
{
|
||||
@ -766,10 +766,10 @@ void FifoPlayerDlg::OnObjectCmdListSelectionChanged(wxCommandEvent& event)
|
||||
{
|
||||
std::string name;
|
||||
std::string desc;
|
||||
GetBPRegInfo(cmddata+1, &name, &desc);
|
||||
GetBPRegInfo(cmddata + 1, &name, &desc);
|
||||
|
||||
newLabel = _("BP register ");
|
||||
newLabel += (name.empty()) ? wxString::Format(_("UNKNOWN_%02X"), *(cmddata+1)) : StrToWxStr(name);
|
||||
newLabel += (name.empty()) ? wxString::Format(_("UNKNOWN_%02X"), *(cmddata + 1)) : StrToWxStr(name);
|
||||
newLabel += ":\n";
|
||||
|
||||
if (desc.empty())
|
||||
|
@ -36,16 +36,16 @@ public:
|
||||
private:
|
||||
void CreateGUIControls();
|
||||
|
||||
void OnPaint( wxPaintEvent& event );
|
||||
void OnFrameFrom( wxSpinEvent& event );
|
||||
void OnFrameTo( wxSpinEvent& event );
|
||||
void OnObjectFrom( wxSpinEvent& event );
|
||||
void OnObjectTo( wxSpinEvent& event );
|
||||
void OnCheckEarlyMemoryUpdates( wxCommandEvent& event );
|
||||
void OnRecordStop( wxCommandEvent& event );
|
||||
void OnSaveFile( wxCommandEvent& event );
|
||||
void OnNumFramesToRecord( wxSpinEvent& event );
|
||||
void OnCloseClick( wxCommandEvent& event );
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnFrameFrom(wxSpinEvent& event);
|
||||
void OnFrameTo(wxSpinEvent& event);
|
||||
void OnObjectFrom(wxSpinEvent& event);
|
||||
void OnObjectTo(wxSpinEvent& event);
|
||||
void OnCheckEarlyMemoryUpdates(wxCommandEvent& event);
|
||||
void OnRecordStop(wxCommandEvent& event);
|
||||
void OnSaveFile(wxCommandEvent& event);
|
||||
void OnNumFramesToRecord(wxSpinEvent& event);
|
||||
void OnCloseClick(wxCommandEvent& event);
|
||||
|
||||
void OnBeginSearch(wxCommandEvent& event);
|
||||
void OnFindNextClick(wxCommandEvent& event);
|
||||
|
@ -872,7 +872,7 @@ bool CFrame::UIHasFocus()
|
||||
return (focusWindow != nullptr);
|
||||
}
|
||||
|
||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED(event))
|
||||
{
|
||||
// Show all platforms and regions if...
|
||||
// 1. All platforms are set to hide
|
||||
@ -1112,7 +1112,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event)
|
||||
|
||||
void CFrame::OnKeyUp(wxKeyEvent& event)
|
||||
{
|
||||
if(Core::IsRunning() && (RendererHasFocus() || TASInputHasFocus()))
|
||||
if (Core::IsRunning() && (RendererHasFocus() || TASInputHasFocus()))
|
||||
{
|
||||
if (IsHotkey(event, HK_TOGGLE_THROTTLE))
|
||||
{
|
||||
@ -1197,12 +1197,12 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||
ToggleDisplayMode(enable_fullscreen);
|
||||
|
||||
#if defined(__APPLE__)
|
||||
NSView *view = (NSView *) m_RenderFrame->GetHandle();
|
||||
NSView *view = (NSView *)m_RenderFrame->GetHandle();
|
||||
NSWindow *window = [view window];
|
||||
|
||||
if (enable_fullscreen != RendererIsFullscreen())
|
||||
{
|
||||
[window toggleFullScreen:nil];
|
||||
[window toggleFullScreen : nil];
|
||||
}
|
||||
#else
|
||||
if (enable_fullscreen)
|
||||
|
@ -335,7 +335,7 @@ void CFrame::OnTab(wxAuiNotebookEvent& event)
|
||||
// Create the popup menu
|
||||
wxMenu MenuPopup;
|
||||
|
||||
wxMenuItem* Item = new wxMenuItem(&MenuPopup, wxID_ANY, _("Select floating windows"));
|
||||
wxMenuItem* Item = new wxMenuItem(&MenuPopup, wxID_ANY, _("Select floating windows"));
|
||||
MenuPopup.Append(Item);
|
||||
Item->Enable(false);
|
||||
MenuPopup.Append(new wxMenuItem(&MenuPopup));
|
||||
@ -467,7 +467,7 @@ void CFrame::DoAddPage(wxWindow *Win, int i, bool Float)
|
||||
if (!Win) return;
|
||||
|
||||
// Ensure accessor remains within valid bounds.
|
||||
if (i < 0 || i > GetNotebookCount()-1)
|
||||
if (i < 0 || i > GetNotebookCount() - 1)
|
||||
i = 0;
|
||||
|
||||
// The page was already previously added, no need to add it again.
|
||||
@ -682,7 +682,7 @@ void CFrame::SetPaneSize()
|
||||
// Convert percentages to pixel lengths
|
||||
W = (W * iClientX) / 100;
|
||||
H = (H * iClientY) / 100;
|
||||
m_Mgr->GetAllPanes()[i].BestSize(W,H).MinSize(W,H);
|
||||
m_Mgr->GetAllPanes()[i].BestSize(W, H).MinSize(W, H);
|
||||
|
||||
j++;
|
||||
}
|
||||
@ -693,7 +693,7 @@ void CFrame::SetPaneSize()
|
||||
{
|
||||
if (!m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiToolBar)))
|
||||
{
|
||||
m_Mgr->GetAllPanes()[i].MinSize(-1,-1);
|
||||
m_Mgr->GetAllPanes()[i].MinSize(-1, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -842,7 +842,7 @@ void CFrame::SaveIniPerspectives()
|
||||
{
|
||||
STmp += Perspective.Name + ",";
|
||||
}
|
||||
STmp = STmp.substr(0, STmp.length()-1);
|
||||
STmp = STmp.substr(0, STmp.length() - 1);
|
||||
|
||||
IniFile::Section* perspectives = ini.GetOrCreateSection("Perspectives");
|
||||
perspectives->Set("Perspectives", STmp);
|
||||
@ -862,8 +862,8 @@ void CFrame::SaveIniPerspectives()
|
||||
SHeight += StringFromFormat("%i,", Perspective.Height[j]);
|
||||
}
|
||||
// Remove the ending ","
|
||||
SWidth = SWidth.substr(0, SWidth.length()-1);
|
||||
SHeight = SHeight.substr(0, SHeight.length()-1);
|
||||
SWidth = SWidth.substr(0, SWidth.length() - 1);
|
||||
SHeight = SHeight.substr(0, SHeight.length() - 1);
|
||||
|
||||
perspec_section->Set("Width", SWidth);
|
||||
perspec_section->Set("Height", SHeight);
|
||||
|
@ -189,7 +189,7 @@ wxMenuBar* CFrame::CreateMenu()
|
||||
loadMenu->Append(IDM_UNDO_SAVE_STATE, GetMenuLabel(HK_UNDO_SAVE_STATE));
|
||||
saveMenu->AppendSeparator();
|
||||
|
||||
loadMenu->Append(IDM_LOAD_STATE_FILE, GetMenuLabel(HK_LOAD_STATE_FILE));
|
||||
loadMenu->Append(IDM_LOAD_STATE_FILE, GetMenuLabel(HK_LOAD_STATE_FILE));
|
||||
loadMenu->Append(IDM_LOAD_SELECTED_SLOT, GetMenuLabel(HK_LOAD_STATE_SLOT_SELECTED));
|
||||
loadMenu->Append(IDM_UNDO_LOAD_STATE, GetMenuLabel(HK_UNDO_LOAD_STATE));
|
||||
loadMenu->AppendSeparator();
|
||||
@ -198,7 +198,7 @@ wxMenuBar* CFrame::CreateMenu()
|
||||
{
|
||||
loadMenu->Append(IDM_LOAD_SLOT_1 + i - 1, GetMenuLabel(HK_LOAD_STATE_SLOT_1 + i - 1));
|
||||
saveMenu->Append(IDM_SAVE_SLOT_1 + i - 1, GetMenuLabel(HK_SAVE_STATE_SLOT_1 + i - 1));
|
||||
slotSelectMenu->Append(IDM_SELECT_SLOT_1 + i - 1, GetMenuLabel(HK_SELECT_STATE_SLOT_1 + i -1));
|
||||
slotSelectMenu->Append(IDM_SELECT_SLOT_1 + i - 1, GetMenuLabel(HK_SELECT_STATE_SLOT_1 + i - 1));
|
||||
}
|
||||
|
||||
loadMenu->AppendSeparator();
|
||||
@ -939,12 +939,12 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||
if (bFullscreen && SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
|
||||
{
|
||||
DEVMODE dmScreenSettings;
|
||||
memset(&dmScreenSettings,0,sizeof(dmScreenSettings));
|
||||
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
|
||||
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
|
||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
||||
"%dx%d", &dmScreenSettings.dmPelsWidth, &dmScreenSettings.dmPelsHeight);
|
||||
dmScreenSettings.dmBitsPerPel = 32;
|
||||
dmScreenSettings.dmFields = DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;
|
||||
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
||||
|
||||
// Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.
|
||||
ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);
|
||||
@ -1424,7 +1424,7 @@ void CFrame::ClearStatusBar()
|
||||
|
||||
void CFrame::StatusBarMessage(const char * Text, ...)
|
||||
{
|
||||
const int MAX_BYTES = 1024*10;
|
||||
const int MAX_BYTES = 1024 * 10;
|
||||
char Str[MAX_BYTES];
|
||||
va_list ArgPtr;
|
||||
va_start(ArgPtr, Text);
|
||||
@ -1433,7 +1433,7 @@ void CFrame::StatusBarMessage(const char * Text, ...)
|
||||
|
||||
if (this->GetStatusBar()->IsEnabled())
|
||||
{
|
||||
this->GetStatusBar()->SetStatusText(StrToWxStr(Str),0);
|
||||
this->GetStatusBar()->SetStatusText(StrToWxStr(Str), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ void CGameListCtrl::OnOpenSaveFolder(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
void CGameListCtrl::OnExportSave(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
const GameListItem* iso = GetSelectedISO();
|
||||
const GameListItem* iso = GetSelectedISO();
|
||||
if (!iso)
|
||||
return;
|
||||
|
||||
@ -1118,10 +1118,10 @@ bool CGameListCtrl::MultiCompressCB(const std::string& text, float percent, void
|
||||
{
|
||||
percent = (((float)m_currentItem) + percent) / (float)m_numberItem;
|
||||
wxString textString(StrToWxStr(StringFromFormat("%s (%i/%i) - %s",
|
||||
m_currentFilename.c_str(), (int)m_currentItem+1,
|
||||
m_currentFilename.c_str(), (int)m_currentItem + 1,
|
||||
(int)m_numberItem, text.c_str())));
|
||||
|
||||
return ((wxProgressDialog*)arg)->Update((int)(percent*1000), textString);
|
||||
return ((wxProgressDialog*)arg)->Update((int)(percent * 1000), textString);
|
||||
}
|
||||
|
||||
void CGameListCtrl::OnMultiCompressISO(wxCommandEvent& /*event*/)
|
||||
@ -1160,7 +1160,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
|
||||
m_currentItem = 0;
|
||||
m_numberItem = GetSelectedItemCount();
|
||||
for (u32 i=0; i < m_numberItem; i++)
|
||||
for (u32 i = 0; i < m_numberItem; i++)
|
||||
{
|
||||
const GameListItem* iso = GetSelectedISO();
|
||||
if (iso->GetPlatform() == GameListItem::WII_WAD || iso->GetFileName().rfind(".wbfs") != std::string::npos)
|
||||
@ -1230,7 +1230,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
||||
bool CGameListCtrl::CompressCB(const std::string& text, float percent, void* arg)
|
||||
{
|
||||
return ((wxProgressDialog*)arg)->
|
||||
Update((int)(percent*1000), StrToWxStr(text));
|
||||
Update((int)(percent * 1000), StrToWxStr(text));
|
||||
}
|
||||
|
||||
void CGameListCtrl::OnCompressISO(wxCommandEvent& WXUNUSED (event))
|
||||
@ -1374,7 +1374,7 @@ void CGameListCtrl::AutomaticColumnWidth()
|
||||
|
||||
void CGameListCtrl::UnselectAll()
|
||||
{
|
||||
for (int i=0; i<GetItemCount(); i++)
|
||||
for (int i = 0; i < GetItemCount(); i++)
|
||||
{
|
||||
SetItemState(i, 0, wxLIST_STATE_SELECTED);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
const wxString& title = _("Properties"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER);
|
||||
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
||||
virtual ~CISOProperties();
|
||||
|
||||
bool bRefreshList;
|
||||
|
@ -131,7 +131,7 @@ class PlatformX11 : public Platform
|
||||
XSetWMProtocols(dpy, win, wmProtocols, 1);
|
||||
XMapRaised(dpy, win);
|
||||
XFlush(dpy);
|
||||
s_window_handle = (void*) win;
|
||||
s_window_handle = (void*)win;
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||
X11Utils::InhibitScreensaver(dpy, win, true);
|
||||
@ -145,10 +145,10 @@ class PlatformX11 : public Platform
|
||||
// make a blank cursor
|
||||
Pixmap Blank;
|
||||
XColor DummyColor;
|
||||
char ZeroData[1] = {0};
|
||||
Blank = XCreateBitmapFromData (dpy, win, ZeroData, 1, 1);
|
||||
char ZeroData[1] = { 0 };
|
||||
Blank = XCreateBitmapFromData(dpy, win, ZeroData, 1, 1);
|
||||
blankCursor = XCreatePixmapCursor(dpy, Blank, Blank, &DummyColor, &DummyColor, 0, 0);
|
||||
XFreePixmap (dpy, Blank);
|
||||
XFreePixmap(dpy, Blank);
|
||||
XDefineCursor(dpy, win, blankCursor);
|
||||
}
|
||||
}
|
||||
|
@ -38,21 +38,21 @@
|
||||
#define ARROWS slot ? "" : ARROW[slot], slot ? ARROW[slot] : ""
|
||||
|
||||
const u8 hdr[] = {
|
||||
0x42,0x4D,
|
||||
0x38,0x30,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,
|
||||
0x36,0x00,0x00,0x00,
|
||||
0x28,0x00,0x00,0x00,
|
||||
0x20,0x00,0x00,0x00, //W
|
||||
0x20,0x00,0x00,0x00, //H
|
||||
0x01,0x00,
|
||||
0x20,0x00,
|
||||
0x00,0x00,0x00,0x00,
|
||||
0x02,0x30,0x00,0x00, //data size
|
||||
0x12,0x0B,0x00,0x00,
|
||||
0x12,0x0B,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00
|
||||
0x42, 0x4D,
|
||||
0x38, 0x30, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x00,
|
||||
0x28, 0x00, 0x00, 0x00,
|
||||
0x20, 0x00, 0x00, 0x00, //W
|
||||
0x20, 0x00, 0x00, 0x00, //H
|
||||
0x01, 0x00,
|
||||
0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x30, 0x00, 0x00, //data size
|
||||
0x12, 0x0B, 0x00, 0x00,
|
||||
0x12, 0x0B, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static wxBitmap wxBitmapFromMemoryRGBA(const unsigned char* data, u32 width, u32 height)
|
||||
@ -61,28 +61,28 @@ static wxBitmap wxBitmapFromMemoryRGBA(const unsigned char* data, u32 width, u32
|
||||
|
||||
u32 bytes = (stride*height) + sizeof(hdr);
|
||||
|
||||
bytes = (bytes+3)&(~3);
|
||||
bytes = (bytes + 3)&(~3);
|
||||
|
||||
u8 *pdata = new u8[bytes];
|
||||
|
||||
memcpy(pdata,hdr,sizeof(hdr));
|
||||
memset(pdata+sizeof(hdr),0,bytes-sizeof(hdr));
|
||||
memcpy(pdata, hdr, sizeof(hdr));
|
||||
memset(pdata + sizeof(hdr), 0, bytes - sizeof(hdr));
|
||||
|
||||
u8 *pixelData = pdata + sizeof(hdr);
|
||||
|
||||
for (u32 y=0;y<height;y++)
|
||||
for (u32 y = 0; y < height; y++)
|
||||
{
|
||||
memcpy(pixelData+y*stride,data+(height-y-1)*stride,stride);
|
||||
memcpy(pixelData + y*stride, data + (height - y - 1)*stride, stride);
|
||||
}
|
||||
|
||||
*(u32*)(pdata+18) = width;
|
||||
*(u32*)(pdata+22) = height;
|
||||
*(u32*)(pdata+34) = bytes-sizeof(hdr);
|
||||
*(u32*)(pdata + 18) = width;
|
||||
*(u32*)(pdata + 22) = height;
|
||||
*(u32*)(pdata + 34) = bytes - sizeof(hdr);
|
||||
|
||||
wxMemoryInputStream is(pdata, bytes);
|
||||
wxBitmap map(wxImage(is, wxBITMAP_TYPE_BMP, -1), -1);
|
||||
|
||||
delete [] pdata;
|
||||
delete[] pdata;
|
||||
|
||||
return map;
|
||||
}
|
||||
@ -114,8 +114,8 @@ END_EVENT_TABLE()
|
||||
CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
memoryCard[SLOT_A]=nullptr;
|
||||
memoryCard[SLOT_B]=nullptr;
|
||||
memoryCard[SLOT_A] = nullptr;
|
||||
memoryCard[SLOT_B] = nullptr;
|
||||
|
||||
mcmSettings.twoCardsLoaded = false;
|
||||
if (!LoadSettings())
|
||||
@ -124,7 +124,7 @@ CMemcardManager::CMemcardManager(wxWindow* parent, wxWindowID id, const wxString
|
||||
mcmSettings.usePages = true;
|
||||
for (int i = COLUMN_BANNER; i < NUMBER_OF_COLUMN; i++)
|
||||
{
|
||||
mcmSettings.column[i] = (i <= COLUMN_FIRSTBLOCK)? true:false;
|
||||
mcmSettings.column[i] = (i <= COLUMN_FIRSTBLOCK) ? true : false;
|
||||
}
|
||||
}
|
||||
maxPages = (128 / itemsPerPage) - 1;
|
||||
@ -219,52 +219,52 @@ void CMemcardManager::CreateGUIControls()
|
||||
m_PrevPage[slot] = new wxButton(this, ID_PREVPAGE_A + slot, _("Prev Page"));
|
||||
m_NextPage[slot] = new wxButton(this, ID_NEXTPAGE_A + slot, _("Next Page"));
|
||||
|
||||
t_Status[slot] = new wxStaticText(this, 0, wxEmptyString, wxDefaultPosition,wxDefaultSize, 0, wxEmptyString);
|
||||
t_Status[slot] = new wxStaticText(this, 0, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, wxEmptyString);
|
||||
|
||||
wxBoxSizer * const sPages = new wxBoxSizer(wxHORIZONTAL);
|
||||
sPages->Add(m_PrevPage[slot], 0, wxEXPAND|wxALL, 1);
|
||||
sPages->Add(t_Status[slot],0, wxEXPAND|wxALL, 5);
|
||||
sPages->Add(m_PrevPage[slot], 0, wxEXPAND | wxALL, 1);
|
||||
sPages->Add(t_Status[slot], 0, wxEXPAND | wxALL, 5);
|
||||
sPages->Add(0, 0, 1, wxEXPAND|wxALL, 0);
|
||||
sPages->Add(m_NextPage[slot], 0, wxEXPAND|wxALL, 1);
|
||||
sPages->Add(m_NextPage[slot], 0, wxEXPAND | wxALL, 1);
|
||||
|
||||
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("|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL|wxFLP_OPEN);
|
||||
_("GameCube Memory Cards (*.raw,*.gcp)") + wxString("|*.raw;*.gcp"), wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN);
|
||||
|
||||
m_MemcardList[slot] = new CMemcardListCtrl(this, ID_MEMCARDLIST_A + slot, wxDefaultPosition, wxSize(350,400),
|
||||
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);
|
||||
m_MemcardList[slot]->AssignImageList(new wxImageList(96, 32), wxIMAGE_LIST_SMALL);
|
||||
|
||||
sMemcard[slot] = new wxStaticBoxSizer(wxVERTICAL, this, _("Memory Card") + wxString::Format(" %c", 'A' + slot));
|
||||
sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND|wxALL, 5);
|
||||
sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND|wxALL, 5);
|
||||
sMemcard[slot]->Add(sPages, 0, wxEXPAND|wxALL, 1);
|
||||
sMemcard[slot]->Add(m_MemcardPath[slot], 0, wxEXPAND | wxALL, 5);
|
||||
sMemcard[slot]->Add(m_MemcardList[slot], 1, wxEXPAND | wxALL, 5);
|
||||
sMemcard[slot]->Add(sPages, 0, wxEXPAND | wxALL, 1);
|
||||
}
|
||||
|
||||
wxBoxSizer * const sButtons = new wxBoxSizer(wxVERTICAL);
|
||||
sButtons->AddStretchSpacer(2);
|
||||
sButtons->Add(m_CopyFrom[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_CopyFrom[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_CopyFrom[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_CopyFrom[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer(1);
|
||||
sButtons->Add(m_SaveImport[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_SaveExport[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer(1);
|
||||
sButtons->Add(m_ConvertToGci, 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_ConvertToGci, 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer(1);
|
||||
sButtons->Add(m_SaveImport[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_SaveExport[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer(1);
|
||||
sButtons->Add(m_Delete[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_Delete[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_Delete[SLOT_A], 0, wxEXPAND, 5);
|
||||
sButtons->Add(m_Delete[SLOT_B], 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer();
|
||||
sButtons->Add(new wxButton(this, wxID_OK, _("Close")), 0, wxEXPAND, 5);
|
||||
sButtons->AddStretchSpacer();
|
||||
|
||||
wxBoxSizer * const sMain = new wxBoxSizer(wxHORIZONTAL);
|
||||
sMain->Add(sMemcard[SLOT_A], 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(sMemcard[SLOT_A], 1, wxEXPAND | wxALL, 5);
|
||||
sMain->Add(sButtons, 0, wxEXPAND, 0);
|
||||
sMain->Add(sMemcard[SLOT_B], 1, wxEXPAND|wxALL, 5);
|
||||
sMain->Add(sMemcard[SLOT_B], 1, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizerAndFit(sMain);
|
||||
Center();
|
||||
@ -549,7 +549,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
wxString temp2 = wxFileSelector(_("Save GCI as..."),
|
||||
wxEmptyString, wxEmptyString, ".gci",
|
||||
_("GCI File(*.gci)") + wxString("|*.gci"),
|
||||
wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this);
|
||||
wxFD_OVERWRITE_PROMPT | wxFD_SAVE, this);
|
||||
|
||||
if (temp2.empty())
|
||||
break;
|
||||
@ -563,7 +563,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
}
|
||||
break;
|
||||
case ID_SAVEEXPORT_A:
|
||||
slot=SLOT_A;
|
||||
slot = SLOT_A;
|
||||
index = index_A;
|
||||
case ID_SAVEEXPORT_B:
|
||||
index = memoryCard[slot]->GetFileIndex(index);
|
||||
@ -582,7 +582,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
_("Native GCI files(*.gci)") + wxString("|*.gci|") +
|
||||
_("MadCatz Gameshark files(*.gcs)") + wxString("|*.gcs|") +
|
||||
_("Datel MaxDrive/Pro files(*.sav)") + wxString("|*.sav"),
|
||||
wxFD_OVERWRITE_PROMPT|wxFD_SAVE, this);
|
||||
wxFD_OVERWRITE_PROMPT | wxFD_SAVE, this);
|
||||
|
||||
if (fileName.length() > 0)
|
||||
{
|
||||
@ -594,7 +594,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
}
|
||||
break;
|
||||
case ID_EXPORTALL_A:
|
||||
slot=SLOT_A;
|
||||
slot = SLOT_A;
|
||||
case ID_EXPORTALL_B:
|
||||
{
|
||||
std::string path1, path2, mpath;
|
||||
@ -661,9 +661,9 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
|
||||
list->RemoveAll();
|
||||
|
||||
u8 nFiles = memoryCard[card]->GetNumFiles();
|
||||
int *images = new int[nFiles*2];
|
||||
int *images = new int[nFiles * 2];
|
||||
|
||||
for (u8 i = 0;i < nFiles;i++)
|
||||
for (u8 i = 0; i < nFiles; i++)
|
||||
{
|
||||
static u32 pxdata[96*32];
|
||||
static u8 animDelay[8];
|
||||
@ -674,45 +674,45 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
|
||||
|
||||
if (!memoryCard[card]->ReadBannerRGBA8(fileIndex, pxdata))
|
||||
{
|
||||
memset(pxdata,0,96*32*4);
|
||||
memset(pxdata, 0, 96*32*4);
|
||||
|
||||
if (numFrames>0) // Just use the first one
|
||||
if (numFrames > 0) // Just use the first one
|
||||
{
|
||||
u32 *icdata = animData;
|
||||
|
||||
for (int y=0;y<32;y++)
|
||||
for (int y = 0; y < 32; y++)
|
||||
{
|
||||
for (int x=0;x<32;x++)
|
||||
for (int x = 0; x < 32; x++)
|
||||
{
|
||||
pxdata[y*96+x+32] = icdata[y*32+x];// | 0xFF000000
|
||||
pxdata[y*96 + x + 32] = icdata[y*32 + x];// | 0xFF000000
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wxBitmap map = wxBitmapFromMemoryRGBA((u8*)pxdata,96,32);
|
||||
wxBitmap map = wxBitmapFromMemoryRGBA((u8*)pxdata, 96, 32);
|
||||
images[i*2] = list->Add(map);
|
||||
|
||||
if (numFrames>0)
|
||||
if (numFrames > 0)
|
||||
{
|
||||
memset(pxdata,0,96*32*4);
|
||||
int frames=3;
|
||||
memset(pxdata, 0, 96*32*4);
|
||||
int frames = 3;
|
||||
|
||||
if (numFrames<frames)
|
||||
frames=numFrames;
|
||||
if (numFrames < frames)
|
||||
frames = numFrames;
|
||||
|
||||
for (int f=0;f<frames;f++)
|
||||
for (int f = 0; f < frames; f++)
|
||||
{
|
||||
for (int y=0;y<32;y++)
|
||||
for (int y = 0; y < 32; y++)
|
||||
{
|
||||
for (int x=0;x<32;x++)
|
||||
for (int x = 0; x < 32; x++)
|
||||
{
|
||||
pxdata[y*96 + x + 32*f] = animData[f*32*32 + y*32 + x];
|
||||
}
|
||||
}
|
||||
}
|
||||
wxBitmap icon = wxBitmapFromMemoryRGBA((u8*)pxdata,96,32);
|
||||
images[i*2+1] = list->Add(icon);
|
||||
wxBitmap icon = wxBitmapFromMemoryRGBA((u8*)pxdata, 96, 32);
|
||||
images[i*2 + 1] = list->Add(icon);
|
||||
}
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
|
||||
blocks = 0;
|
||||
|
||||
wxBlock.Printf("%10d", blocks);
|
||||
m_MemcardList[card]->SetItem(index,COLUMN_BLOCKS, wxBlock);
|
||||
m_MemcardList[card]->SetItem(index, COLUMN_BLOCKS, wxBlock);
|
||||
firstblock = memoryCard[card]->DEntry_FirstBlock(fileIndex);
|
||||
//if (firstblock == 0xFFFF) firstblock = 3; // to make firstblock -1
|
||||
wxFirstBlock.Printf("%15d", firstblock);
|
||||
@ -758,7 +758,7 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
|
||||
if (images[j] >= 0)
|
||||
{
|
||||
m_MemcardList[card]->SetItemImage(index, images[j*2]);
|
||||
m_MemcardList[card]->SetItemColumnImage(index, COLUMN_ICON, images[j*2+1]);
|
||||
m_MemcardList[card]->SetItemColumnImage(index, COLUMN_ICON, images[j*2 + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -804,7 +804,6 @@ bool CMemcardManager::ReloadMemcard(const std::string& fileName, int card)
|
||||
|
||||
void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
{
|
||||
|
||||
int flags;
|
||||
long item = HitTest(event.GetPosition(), flags);
|
||||
wxMenu popupMenu;
|
||||
@ -813,7 +812,7 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
{
|
||||
if (GetItemState(item, wxLIST_STATE_SELECTED) != wxLIST_STATE_SELECTED)
|
||||
{
|
||||
SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||
SetItemState(item, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
|
||||
}
|
||||
SetItemState(item, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED);
|
||||
|
||||
|
@ -68,7 +68,7 @@ static std::string BuildGameName(const GameListItem& game)
|
||||
|
||||
static void FillWithGameNames(wxListBox* game_lbox, const CGameListCtrl& game_list)
|
||||
{
|
||||
for (u32 i = 0 ; auto game = game_list.GetISO(i); ++i)
|
||||
for (u32 i = 0; auto game = game_list.GetISO(i); ++i)
|
||||
game_lbox->Append(StrToWxStr(BuildGameName(*game)));
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game
|
||||
m_start_btn->Bind(wxEVT_BUTTON, &NetPlayDiag::OnStart, this);
|
||||
bottom_szr->Add(m_start_btn);
|
||||
|
||||
bottom_szr->Add(new wxStaticText(panel, wxID_ANY, _("Buffer:")), 0, wxLEFT | wxCENTER, 5 );
|
||||
bottom_szr->Add(new wxStaticText(panel, wxID_ANY, _("Buffer:")), 0, wxLEFT | wxCENTER, 5);
|
||||
wxSpinCtrl* const padbuf_spin = new wxSpinCtrl(panel, wxID_ANY, std::to_string(INITIAL_PAD_BUFFER_SIZE)
|
||||
, wxDefaultPosition, wxSize(64, -1), wxSP_ARROW_KEYS, 0, 200, INITIAL_PAD_BUFFER_SIZE);
|
||||
padbuf_spin->Bind(wxEVT_SPINCTRL, &NetPlayDiag::OnAdjustBuffer, this);
|
||||
@ -447,7 +447,7 @@ void NetPlayDiag::GetNetSettings(NetSettings &settings)
|
||||
std::string NetPlayDiag::FindGame()
|
||||
{
|
||||
// find path for selected game, sloppy..
|
||||
for (u32 i = 0 ; auto game = m_game_list->GetISO(i); ++i)
|
||||
for (u32 i = 0; auto game = m_game_list->GetISO(i); ++i)
|
||||
if (m_selected_game == BuildGameName(*game))
|
||||
return game->GetFileName();
|
||||
|
||||
@ -573,7 +573,7 @@ void NetPlayDiag::OnThread(wxThreadEvent& event)
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
case NP_GUI_EVT_CHANGE_GAME :
|
||||
case NP_GUI_EVT_CHANGE_GAME:
|
||||
// update selected game :/
|
||||
{
|
||||
m_selected_game.assign(WxStrToStr(event.GetString()));
|
||||
@ -690,7 +690,7 @@ void ChangeGameDiag::OnPick(wxCommandEvent& event)
|
||||
PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiimotemap[], std::vector<const Player *>& player_list)
|
||||
: wxDialog(parent, wxID_ANY, _("Configure Pads"))
|
||||
, m_mapping(map)
|
||||
, m_wiimapping (wiimotemap)
|
||||
, m_wiimapping(wiimotemap)
|
||||
, m_player_list(player_list)
|
||||
{
|
||||
wxBoxSizer* const h_szr = new wxBoxSizer(wxHORIZONTAL);
|
||||
@ -701,11 +701,11 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim
|
||||
for (auto& player : m_player_list)
|
||||
player_names.Add(player->name);
|
||||
|
||||
for (unsigned int i=0; i<4; ++i)
|
||||
for (unsigned int i = 0; i < 4; ++i)
|
||||
{
|
||||
wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL);
|
||||
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)('0'+i))),
|
||||
1, wxALIGN_CENTER_HORIZONTAL);
|
||||
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Pad ")) + (wxChar)('0' + i))),
|
||||
1, wxALIGN_CENTER_HORIZONTAL);
|
||||
|
||||
m_map_cbox[i] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names);
|
||||
m_map_cbox[i]->Bind(wxEVT_CHOICE, &PadMapDiag::OnAdjust, this);
|
||||
@ -722,11 +722,11 @@ PadMapDiag::PadMapDiag(wxWindow* const parent, PadMapping map[], PadMapping wiim
|
||||
h_szr->AddSpacer(10);
|
||||
}
|
||||
|
||||
for (unsigned int i=0; i<4; ++i)
|
||||
for (unsigned int i = 0; i < 4; ++i)
|
||||
{
|
||||
wxBoxSizer* const v_szr = new wxBoxSizer(wxVERTICAL);
|
||||
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)('0'+i))),
|
||||
1, wxALIGN_CENTER_HORIZONTAL);
|
||||
v_szr->Add(new wxStaticText(this, wxID_ANY, (wxString(_("Wiimote ")) + (wxChar)('0' + i))),
|
||||
1, wxALIGN_CENTER_HORIZONTAL);
|
||||
|
||||
m_map_cbox[i+4] = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, player_names);
|
||||
m_map_cbox[i+4]->Bind(wxEVT_CHOICE, &PadMapDiag::OnAdjust, this);
|
||||
|
@ -70,8 +70,8 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
|
||||
|
||||
EntrySelection = new wxSpinButton(this);
|
||||
EntrySelection->Bind(wxEVT_SPIN, &CPatchAddEdit::ChangeEntry, this);
|
||||
EntrySelection->SetRange(0, (int)tempEntries.size()-1);
|
||||
EntrySelection->SetValue((int)tempEntries.size()-1);
|
||||
EntrySelection->SetRange(0, (int)tempEntries.size() - 1);
|
||||
EntrySelection->SetValue((int)tempEntries.size() - 1);
|
||||
|
||||
wxArrayString wxArrayStringFor_EditPatchType;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
@ -92,19 +92,19 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
|
||||
EntryRemove->Disable();
|
||||
|
||||
wxBoxSizer* sEditPatchName = new wxBoxSizer(wxHORIZONTAL);
|
||||
sEditPatchName->Add(EditPatchNameText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||
sEditPatchName->Add(EditPatchName, 1, wxEXPAND|wxALL, 5);
|
||||
sEditPatchName->Add(EditPatchNameText, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sEditPatchName->Add(EditPatchName, 1, wxEXPAND | wxALL, 5);
|
||||
sEditPatch->Add(sEditPatchName, 0, wxEXPAND);
|
||||
sbEntry = new wxStaticBoxSizer(wxVERTICAL, this, wxString::Format(_("Entry 1/%d"), (int)tempEntries.size()));
|
||||
currentItem = 1;
|
||||
|
||||
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(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);
|
||||
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(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);
|
||||
sgEntry->AddGrowableCol(1);
|
||||
|
||||
wxBoxSizer* sEntryAddRemove = new wxBoxSizer(wxHORIZONTAL);
|
||||
@ -113,8 +113,8 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
|
||||
sbEntry->Add(sgEntry, 0, wxEXPAND);
|
||||
sbEntry->Add(sEntryAddRemove, 0, wxEXPAND);
|
||||
|
||||
sEditPatch->Add(sbEntry, 0, wxEXPAND|wxALL, 5);
|
||||
sEditPatch->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND|wxLEFT|wxRIGHT|wxBOTTOM, 5);
|
||||
sEditPatch->Add(sbEntry, 0, wxEXPAND | wxALL, 5);
|
||||
sEditPatch->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
SetSizerAndFit(sEditPatch);
|
||||
SetFocus();
|
||||
}
|
||||
|
@ -290,7 +290,6 @@ void PostProcessingConfigDiag::Event_Slider(wxCommandEvent &ev)
|
||||
s32 value = option_data.m_integer_step_values[i] * current_step + option_data.m_integer_min_values[i];
|
||||
m_post_processor->SetOptioni(config->GetOption(), i, value);
|
||||
string_value = std::to_string(value);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ void TASInputDlg::CreateBaseLayout()
|
||||
}
|
||||
|
||||
const int TASInputDlg::m_gc_pad_buttons_bitmask[12] = {
|
||||
PAD_BUTTON_DOWN, PAD_BUTTON_UP, PAD_BUTTON_LEFT,PAD_BUTTON_RIGHT, PAD_BUTTON_A, PAD_BUTTON_B,
|
||||
PAD_BUTTON_DOWN, PAD_BUTTON_UP, PAD_BUTTON_LEFT, PAD_BUTTON_RIGHT, PAD_BUTTON_A, PAD_BUTTON_B,
|
||||
PAD_BUTTON_X, PAD_BUTTON_Y, PAD_TRIGGER_Z, PAD_TRIGGER_L, PAD_TRIGGER_R, PAD_BUTTON_START
|
||||
};
|
||||
|
||||
@ -133,7 +133,7 @@ void TASInputDlg::CreateWiiLayout(int num)
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(D_CONFIG_IDX) + "WiimoteNew.ini");
|
||||
std::string extension;
|
||||
ini.GetIfExists("Wiimote" + std::to_string(num+1), "Extension", &extension);
|
||||
ini.GetIfExists("Wiimote" + std::to_string(num + 1), "Extension", &extension);
|
||||
|
||||
if (extension == "Nunchuk")
|
||||
m_ext = 1;
|
||||
@ -288,7 +288,7 @@ TASInputDlg::Stick TASInputDlg::CreateStick(int id_stick, int xRange, int yRange
|
||||
tempStick.bitmap->Bind(wxEVT_LEFT_DOWN, &TASInputDlg::OnMouseDownL, this);
|
||||
tempStick.bitmap->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this);
|
||||
tempStick.x_cont = CreateControl(wxSL_HORIZONTAL | (reverseX ? wxSL_INVERSE : 0), 120, -1, reverseX, xRange, defaultX);
|
||||
tempStick.y_cont = CreateControl(wxSL_VERTICAL | (reverseY ? wxSL_INVERSE : 0), -1, 120, reverseY, yRange, defaultY);
|
||||
tempStick.y_cont = CreateControl(wxSL_VERTICAL | (reverseY ? wxSL_INVERSE : 0), -1, 120, reverseY, yRange, defaultY);
|
||||
return tempStick;
|
||||
}
|
||||
|
||||
@ -528,7 +528,7 @@ void TASInputDlg::GetValues(u8* data, WiimoteEmu::ReportFeatures rptf, int ext,
|
||||
wm_ir_basic* ir_data = (wm_ir_basic*)irData;
|
||||
for (unsigned int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (x[i*2] < 1024 && y < 768)
|
||||
if (x[i * 2] < 1024 && y < 768)
|
||||
{
|
||||
ir_data[i].x1 = static_cast<u8>(x[i*2]);
|
||||
ir_data[i].x1hi = x[i*2] >> 8;
|
||||
@ -536,10 +536,10 @@ void TASInputDlg::GetValues(u8* data, WiimoteEmu::ReportFeatures rptf, int ext,
|
||||
ir_data[i].y1 = static_cast<u8>(y);
|
||||
ir_data[i].y1hi = y >> 8;
|
||||
}
|
||||
if (x[i*2+1] < 1024 && y < 768)
|
||||
if (x[i*2 + 1] < 1024 && y < 768)
|
||||
{
|
||||
ir_data[i].x2 = static_cast<u8>(x[i*2+1]);
|
||||
ir_data[i].x2hi = x[i*2+1] >> 8;
|
||||
ir_data[i].x2 = static_cast<u8>(x[i*2 + 1]);
|
||||
ir_data[i].x2hi = x[i*2 + 1] >> 8;
|
||||
|
||||
ir_data[i].y2 = static_cast<u8>(y);
|
||||
ir_data[i].y2hi = y >> 8;
|
||||
@ -656,7 +656,7 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
|
||||
text = control->text;
|
||||
}
|
||||
|
||||
int value = ((wxSlider*) event.GetEventObject())->GetValue();
|
||||
int value = ((wxSlider*)event.GetEventObject())->GetValue();
|
||||
if (text)
|
||||
text->SetValue(std::to_string(value));
|
||||
}
|
||||
@ -665,7 +665,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
|
||||
{
|
||||
unsigned long value;
|
||||
|
||||
if (!((wxTextCtrl*) event.GetEventObject())->GetValue().ToULong(&value))
|
||||
if (!((wxTextCtrl*)event.GetEventObject())->GetValue().ToULong(&value))
|
||||
return;
|
||||
|
||||
for (Control* const control : m_controls)
|
||||
@ -742,7 +742,7 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
|
||||
|
||||
stick->x_cont.value = stick->x_cont.default_value;
|
||||
stick->y_cont.value = stick->y_cont.default_value;
|
||||
stick->bitmap->SetBitmap(CreateStickBitmap(128,128));
|
||||
stick->bitmap->SetBitmap(CreateStickBitmap(128, 128));
|
||||
stick->x_cont.text->SetValue(std::to_string(stick->x_cont.default_value));
|
||||
stick->y_cont.text->SetValue(std::to_string(stick->y_cont.default_value));
|
||||
stick->x_cont.slider->SetValue(stick->x_cont.default_value);
|
||||
@ -862,7 +862,7 @@ wxBitmap TASInputDlg::CreateStickBitmap(int x, int y)
|
||||
memDC.SetBrush(*wxRED_BRUSH);
|
||||
memDC.DrawLine(64, 64, x, y);
|
||||
memDC.DrawLine(63, 64, x - 1, y);
|
||||
memDC.DrawLine(65, 64, x + 1 , y);
|
||||
memDC.DrawLine(65, 64, x + 1, y);
|
||||
memDC.DrawLine(64, 63, x, y - 1);
|
||||
memDC.DrawLine(64, 65, x, y + 1);
|
||||
memDC.SetPen(*wxBLACK_PEN);
|
||||
|
@ -671,7 +671,7 @@ SettingRadioButton* VideoConfigDiag::CreateRadioButton(wxWindow* parent, const w
|
||||
/* Use this to register descriptions for controls which have NOT been created using the Create* functions from above */
|
||||
wxControl* VideoConfigDiag::RegisterControl(wxControl* const control, const wxString& description)
|
||||
{
|
||||
ctrl_descs.insert(std::pair<wxWindow*,wxString>(control, description));
|
||||
ctrl_descs.insert(std::pair<wxWindow*, wxString>(control, description));
|
||||
control->Bind(wxEVT_ENTER_WINDOW, &VideoConfigDiag::Evt_EnterControl, this);
|
||||
control->Bind(wxEVT_LEAVE_WINDOW, &VideoConfigDiag::Evt_LeaveControl, this);
|
||||
return control;
|
||||
@ -726,7 +726,7 @@ void VideoConfigDiag::CreateDescriptionArea(wxPanel* const page, wxBoxSizer* con
|
||||
desc_sizer->Add(desc_text, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
|
||||
// Store description text object for later lookup
|
||||
desc_texts.insert(std::pair<wxWindow*,wxStaticText*>(page, desc_text));
|
||||
desc_texts.insert(std::pair<wxWindow*, wxStaticText*>(page, desc_text));
|
||||
}
|
||||
|
||||
void VideoConfigDiag::PopulatePostProcessingShaders()
|
||||
|
Reference in New Issue
Block a user