Fixes spacing for "for", "while", "switch" and "if"

Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
This commit is contained in:
Matthew Parlane 2014-03-11 00:30:55 +13:00
commit 31cfc73a09
189 changed files with 1250 additions and 1159 deletions

View file

@ -203,7 +203,7 @@ CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
CreateGUIControls();
// Update selected ISO paths
for(const std::string& folder : SConfig::GetInstance().m_ISOFolder)
for (const std::string& folder : SConfig::GetInstance().m_ISOFolder)
{
ISOPaths->Append(StrToWxStr(folder));
}
@ -228,7 +228,7 @@ void CConfigMain::SetSelectedTab(int tab)
// Used to restrict changing of some options while emulator is running
void CConfigMain::UpdateGUI()
{
if(Core::GetState() != Core::CORE_UNINITIALIZED)
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
// Disable the Core stuff on GeneralPage
CPUThread->Disable();
@ -1195,7 +1195,7 @@ void CConfigMain::WiiSettingsChanged(wxCommandEvent& event)
int wii_system_lang = WiiSystemLang->GetSelection();
SConfig::GetInstance().m_SYSCONF->SetData("IPL.LNG", wii_system_lang);
u8 country_code = GetSADRCountryCode(wii_system_lang);
if(!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
{
PanicAlert("Failed to update country code in SYSCONF");
}

View file

@ -184,9 +184,9 @@ void CCodeView::InsertBlrNop(int Blr)
{
// Check if this address has been modified
int find = -1;
for(u32 i = 0; i < BlrList.size(); i++)
for (u32 i = 0; i < BlrList.size(); i++)
{
if(BlrList.at(i).Address == selection)
if (BlrList.at(i).Address == selection)
{
find = i;
break;

View file

@ -207,7 +207,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
}
wxString OpenCommand;
OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
if(!OpenCommand.IsEmpty())
if (!OpenCommand.IsEmpty())
wxExecute(OpenCommand, wxEXEC_SYNC);
}
}
@ -227,7 +227,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
switch (event.GetId())
{
case IDM_CLEARSYMBOLS:
if(!AskYesNo("Do you want to clear the list of symbol names?")) return;
if (!AskYesNo("Do you want to clear the list of symbol names?")) return;
g_symbolDB.Clear();
Host_NotifyMapLoaded();
break;
@ -381,9 +381,9 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
if (pSymbol != nullptr)
{
if(pSymbol->type == Symbol::SYMBOL_DATA)
if (pSymbol->type == Symbol::SYMBOL_DATA)
{
if(m_MemoryWindow)// && m_MemoryWindow->IsVisible())
if (m_MemoryWindow)// && m_MemoryWindow->IsVisible())
m_MemoryWindow->JumpToAddress(pSymbol->address);
}
else

View file

@ -83,9 +83,10 @@ void GFXDebuggerPanel::SaveSettings() const
// weird values, perhaps because of some conflict with the rendering window
// TODO: get the screen resolution and make limits from that
if (GetPosition().x < 1000 && GetPosition().y < 1000
&& GetSize().GetWidth() < 1000
&& GetSize().GetHeight() < 1000)
if (GetPosition().x < 1000 &&
GetPosition().y < 1000 &&
GetSize().GetWidth() < 1000 &&
GetSize().GetHeight() < 1000)
{
file.Set("VideoWindow", "x", GetPosition().x);
file.Set("VideoWindow", "y", GetPosition().y);

View file

@ -130,7 +130,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
void CMemoryWindow::Save(IniFile& _IniFile) const
{
// Prevent these bad values that can happen after a crash or hanging
if(GetPosition().x != -32000 && GetPosition().y != -32000)
if (GetPosition().x != -32000 && GetPosition().y != -32000)
{
_IniFile.Set("MemoryWindow", "x", GetPosition().x);
_IniFile.Set("MemoryWindow", "y", GetPosition().y);
@ -356,7 +356,7 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
strcat(tmpstr, WxStrToStr(rawData).c_str());
tmp2 = &Dest.front();
count = 0;
for(i = 0; i < strlen(tmpstr); i++)
for (i = 0; i < strlen(tmpstr); i++)
{
copy[0] = tmpstr[i];
copy[1] = tmpstr[i+1];
@ -381,13 +381,13 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
tmp2 = &Dest.front();
sprintf(tmpstr, "%s", WxStrToStr(rawData).c_str());
for(i = 0; i < size; i++)
for (i = 0; i < size; i++)
tmp2[i] = tmpstr[i];
delete[] tmpstr;
}
if(size)
if (size)
{
unsigned char* pnt = &Dest.front();
unsigned int k = 0;
@ -399,19 +399,19 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
sscanf(WxStrToStr(txt).c_str(), "%08x", &addr);
}
i = addr+4;
for( ; i < szRAM; i++)
for ( ; i < szRAM; ++i)
{
for(k = 0; k < size; k++)
for (k = 0; k < size; ++k)
{
if(i + k > szRAM) break;
if(k > size) break;
if(pnt[k] != TheRAM[i+k])
if (i + k > szRAM) break;
if (k > size) break;
if (pnt[k] != TheRAM[i+k])
{
k = 0;
break;
}
}
if(k == size)
if (k == size)
{
//Match was found
wxMessageBox(_("A match was found. Placing viewer at the offset."));

View file

@ -105,7 +105,7 @@ CPanel::CPanel(
switch (nMsg)
{
case WM_USER:
switch(wParam)
switch (wParam)
{
case WM_USER_STOP:
main_frame->DoStop();
@ -497,7 +497,7 @@ void CFrame::OnClose(wxCloseEvent& event)
}
//Stop Dolphin from saving the minimized Xpos and Ypos
if(main_frame->IsIconized())
if (main_frame->IsIconized())
main_frame->Iconize(false);
// Don't forget the skip or the window won't be destroyed
@ -873,8 +873,8 @@ bool TASInputHasFocus()
void CFrame::OnKeyDown(wxKeyEvent& event)
{
if(Core::GetState() != Core::CORE_UNINITIALIZED &&
(RendererHasFocus() || TASInputHasFocus()))
if (Core::GetState() != Core::CORE_UNINITIALIZED &&
(RendererHasFocus() || TASInputHasFocus()))
{
int WiimoteId = -1;
// Toggle fullscreen
@ -1045,7 +1045,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
#if defined(HAVE_X11) && HAVE_X11
if (Core::GetState() != Core::CORE_UNINITIALIZED)
{
if(event.Dragging())
if (event.Dragging())
X11Utils::SendMotionEvent(X11Utils::XDisplayFromHandle(GetHandle()),
event.GetPosition().x, event.GetPosition().y);
else
@ -1055,7 +1055,7 @@ void CFrame::OnMouse(wxMouseEvent& event)
#endif
// next handlers are all for FreeLook, so we don't need to check them if disabled
if(!g_Config.bFreeLook)
if (!g_Config.bFreeLook)
{
event.Skip();
return;
@ -1066,28 +1066,28 @@ void CFrame::OnMouse(wxMouseEvent& event)
static bool mouseMoveEnabled = false;
static float lastMouse[2];
if(event.MiddleDown())
if (event.MiddleDown())
{
lastMouse[0] = event.GetX();
lastMouse[1] = event.GetY();
mouseMoveEnabled = true;
}
else if(event.RightDown())
else if (event.RightDown())
{
lastMouse[0] = event.GetX();
lastMouse[1] = event.GetY();
mouseLookEnabled = true;
}
else if(event.MiddleUp())
else if (event.MiddleUp())
{
mouseMoveEnabled = false;
}
else if(event.RightUp())
else if (event.RightUp())
{
mouseLookEnabled = false;
}
// no button, so it's a move event
else if(event.GetButton() == wxMOUSE_BTN_NONE)
else if (event.GetButton() == wxMOUSE_BTN_NONE)
{
if (mouseLookEnabled)
{

View file

@ -163,7 +163,7 @@ void CFrame::OnToggleWindow(wxCommandEvent& event)
{
bool bShow = GetMenuBar()->IsChecked(event.GetId());
switch(event.GetId())
switch (event.GetId())
{
case IDM_LOGWINDOW:
if (!g_pCodeWindow)
@ -228,7 +228,7 @@ void CFrame::OnNotebookPageChanged(wxAuiNotebookEvent& event)
// Update the notebook affiliation
for (int i = IDM_LOGWINDOW; i <= IDM_CODEWINDOW; i++)
{
if(GetNotebookAffiliation(i) >= 0)
if (GetNotebookAffiliation(i) >= 0)
g_pCodeWindow->iNbAffiliation[i - IDM_LOGWINDOW] = GetNotebookAffiliation(i);
}
}
@ -596,7 +596,7 @@ void CFrame::OnDropDownToolbarSelect(wxCommandEvent& event)
{
ClearStatusBar();
switch(event.GetId())
switch (event.GetId())
{
case IDM_ADD_PERSPECTIVE:
{
@ -693,7 +693,7 @@ void CFrame::TogglePaneStyle(bool On, int EventId)
Pane.PinButton(true);
Pane.Show();
switch(EventId)
switch (EventId)
{
case IDM_EDIT_PERSPECTIVES:
Pane.CaptionVisible(On);
@ -977,7 +977,7 @@ wxWindow * CFrame::GetNotebookPageFromId(wxWindowID Id)
continue;
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
for(u32 j = 0; j < NB->GetPageCount(); j++)
for (u32 j = 0; j < NB->GetPageCount(); j++)
{
if (NB->GetPage(j)->GetId() == Id)
return NB->GetPage(j);
@ -1024,7 +1024,7 @@ void CFrame::AddRemoveBlankPage()
continue;
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
for(u32 j = 0; j < NB->GetPageCount(); j++)
for (u32 j = 0; j < NB->GetPageCount(); j++)
{
if (NB->GetPageText(j).IsSameAs(wxT("<>")) && NB->GetPageCount() > 1)
NB->DeletePage(j);
@ -1043,7 +1043,7 @@ int CFrame::GetNotebookAffiliation(wxWindowID Id)
continue;
wxAuiNotebook * NB = (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
for(u32 k = 0; k < NB->GetPageCount(); k++)
for (u32 k = 0; k < NB->GetPageCount(); k++)
{
if (NB->GetPage(k)->GetId() == Id)
return j;

View file

@ -175,7 +175,7 @@ void CFrame::CreateMenu()
wxMenu *skippingMenu = new wxMenu;
emulationMenu->AppendSubMenu(skippingMenu, _("Frame S&kipping"));
for(int i = 0; i < 10; i++)
for (int i = 0; i < 10; i++)
skippingMenu->Append(IDM_FRAMESKIP0 + i, wxString::Format(wxT("%i"), i), wxEmptyString, wxITEM_RADIO);
skippingMenu->Check(IDM_FRAMESKIP0 + SConfig::GetInstance().m_FrameSkip, true);
Movie::SetFrameSkipping(SConfig::GetInstance().m_FrameSkip);
@ -613,15 +613,15 @@ void CFrame::BootGame(const std::string& filename)
if (m_GameListCtrl->GetSelectedISO()->IsValid())
bootfile = m_GameListCtrl->GetSelectedISO()->GetFileName();
}
else if (!StartUp.m_strDefaultGCM.empty()
&& wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str())))
else if (!StartUp.m_strDefaultGCM.empty() &&
wxFileExists(wxSafeConvertMB2WX(StartUp.m_strDefaultGCM.c_str())))
{
bootfile = StartUp.m_strDefaultGCM;
}
else
{
if (!SConfig::GetInstance().m_LastFilename.empty()
&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
if (!SConfig::GetInstance().m_LastFilename.empty() &&
wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
{
bootfile = SConfig::GetInstance().m_LastFilename;
}
@ -716,7 +716,7 @@ void CFrame::OnFrameStep(wxCommandEvent& event)
Movie::DoFrameStep();
bool isPaused = (Core::GetState() == Core::CORE_PAUSE);
if(isPaused && !wasPaused) // don't update on unpause, otherwise the status would be wrong when pausing next frame
if (isPaused && !wasPaused) // don't update on unpause, otherwise the status would be wrong when pausing next frame
UpdateGUI();
}
@ -747,7 +747,7 @@ void CFrame::OnRecord(wxCommandEvent& WXUNUSED (event))
controllers |= (1 << (i + 4));
}
if(Movie::BeginRecordingInput(controllers))
if (Movie::BeginRecordingInput(controllers))
BootGame(std::string(""));
}
@ -761,7 +761,7 @@ void CFrame::OnPlayRecording(wxCommandEvent& WXUNUSED (event))
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this);
if(path.IsEmpty())
if (path.IsEmpty())
return;
if (!Movie::IsReadOnly())
@ -878,7 +878,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
m_XRRConfig->ToggleDisplayMode(bFullscreen);
#elif defined __APPLE__
if(bFullscreen)
if (bFullscreen)
CGDisplayHideCursor(CGMainDisplayID());
else
CGDisplayShowCursor(CGMainDisplayID());
@ -1089,9 +1089,9 @@ void CFrame::DoStop()
}
// TODO: Show the author/description dialog here
if(Movie::IsRecordingInput())
if (Movie::IsRecordingInput())
DoRecordingSave();
if(Movie::IsPlayingInput() || Movie::IsRecordingInput())
if (Movie::IsPlayingInput() || Movie::IsRecordingInput())
Movie::EndPlayInput(false);
NetPlay::StopGame();
@ -1180,7 +1180,7 @@ void CFrame::DoRecordingSave()
wxFD_SAVE | wxFD_PREVIEW | wxFD_OVERWRITE_PROMPT,
this);
if(path.IsEmpty())
if (path.IsEmpty())
return;
Movie::SaveRecording(WxStrToStr(path).c_str());
@ -1392,7 +1392,7 @@ void CFrame::OnInstallWAD(wxCommandEvent& event)
{
std::string fileName;
switch(event.GetId())
switch (event.GetId())
{
case IDM_LIST_INSTALLWAD:
{
@ -1709,8 +1709,8 @@ void CFrame::UpdateGUI()
GetMenuBar()->FindItem(IDM_PLAYRECORD)->Enable(true);
}
// Prepare to load last selected file, enable play button
else if (!SConfig::GetInstance().m_LastFilename.empty()
&& wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
else if (!SConfig::GetInstance().m_LastFilename.empty() &&
wxFileExists(wxSafeConvertMB2WX(SConfig::GetInstance().m_LastFilename.c_str())))
{
if (m_ToolBar)
m_ToolBar->EnableTool(IDM_PLAY, true);

View file

@ -97,8 +97,8 @@ void cInterfaceAGL::Update()
size.width *= scale;
size.height *= scale;
if( s_backbuffer_width == size.width
&& s_backbuffer_height == size.height)
if (s_backbuffer_width == size.width &&
s_backbuffer_height == size.height)
return;
s_backbuffer_width = size.width;

View file

@ -93,7 +93,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
const char *s;
EGLint egl_major, egl_minor;
if(!Platform.SelectDisplay())
if (!Platform.SelectDisplay())
return false;
GLWin.egl_dpy = Platform.EGLGetDisplay();
@ -131,7 +131,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
};
switch(s_opengl_mode)
switch (s_opengl_mode)
{
case MODE_OPENGL:
attribs[1] = EGL_OPENGL_BIT;
@ -212,11 +212,11 @@ void cInterfaceEGL::Shutdown()
if (GLWin.egl_ctx)
{
eglMakeCurrent(GLWin.egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if(!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
if (!eglDestroyContext(GLWin.egl_dpy, GLWin.egl_ctx))
NOTICE_LOG(VIDEO, "Could not destroy drawing context.");
if(!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
if (!eglDestroySurface(GLWin.egl_dpy, GLWin.egl_surf))
NOTICE_LOG(VIDEO, "Could not destroy window surface.");
if(!eglTerminate(GLWin.egl_dpy))
if (!eglTerminate(GLWin.egl_dpy))
NOTICE_LOG(VIDEO, "Could not destroy display connection.");
GLWin.egl_ctx = nullptr;
}

View file

@ -161,7 +161,7 @@ void cX11Window::XEventThread()
for (int num_events = XPending(GLWin.evdpy); num_events > 0; num_events--)
{
XNextEvent(GLWin.evdpy, &event);
switch(event.type) {
switch (event.type) {
case ConfigureNotify:
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
break;

View file

@ -120,7 +120,7 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
}
switch(sortData)
switch (sortData)
{
case CGameListCtrl::COLUMN_TITLE:
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
@ -143,9 +143,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
return strcasecmp(cmp1.c_str(), cmp2.c_str()) * t;
}
case CGameListCtrl::COLUMN_COUNTRY:
if(iso1->GetCountry() > iso2->GetCountry())
if (iso1->GetCountry() > iso2->GetCountry())
return 1 * t;
if(iso1->GetCountry() < iso2->GetCountry())
if (iso1->GetCountry() < iso2->GetCountry())
return -1 * t;
return 0;
case CGameListCtrl::COLUMN_SIZE:
@ -155,9 +155,9 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
return -1 * t;
return 0;
case CGameListCtrl::COLUMN_PLATFORM:
if(iso1->GetPlatform() > iso2->GetPlatform())
if (iso1->GetPlatform() > iso2->GetPlatform())
return 1 * t;
if(iso1->GetPlatform() < iso2->GetPlatform())
if (iso1->GetPlatform() < iso2->GetPlatform())
return -1 * t;
return 0;
@ -471,7 +471,7 @@ wxColour blend50(const wxColour& c1, const wxColour& c2)
void CGameListCtrl::SetBackgroundColor()
{
for(long i = 0; i < GetItemCount(); i++)
for (long i = 0; i < GetItemCount(); i++)
{
wxColour color = (i & 1) ?
blend50(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT),
@ -564,7 +564,7 @@ void CGameListCtrl::ScanForISOs()
{
bool list = true;
switch(ISOFile.GetPlatform())
switch (ISOFile.GetPlatform())
{
case GameListItem::WII_DISC:
if (!SConfig::GetInstance().m_ListWii)
@ -580,7 +580,7 @@ void CGameListCtrl::ScanForISOs()
break;
}
switch(ISOFile.GetCountry())
switch (ISOFile.GetCountry())
{
case DiscIO::IVolume::COUNTRY_TAIWAN:
if (!SConfig::GetInstance().m_ListTaiwan)
@ -665,7 +665,7 @@ int wxCALLBACK wxListCompare(long item1, long item2, long sortData)
void CGameListCtrl::OnColumnClick(wxListEvent& event)
{
if(event.GetColumn() != COLUMN_BANNER)
if (event.GetColumn() != COLUMN_BANNER)
{
int current_column = event.GetColumn();
if (sorted)
@ -876,7 +876,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu->AppendCheckItem(IDM_SETDEFAULTGCM, _("Set as &default ISO"));
// First we have to decide a starting value when we append it
if(selected_iso->GetFileName() == SConfig::GetInstance().
if (selected_iso->GetFileName() == SConfig::GetInstance().
m_LocalCoreStartupParameter.m_strDefaultGCM)
popupMenu->FindItem(IDM_SETDEFAULTGCM)->Check();
@ -887,8 +887,8 @@ 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"
&& selected_iso->GetFileName().substr(selected_iso->GetFileName().find_last_of(".")) != ".wbfs")
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..."));
}
else
@ -1039,7 +1039,7 @@ void CGameListCtrl::OnProperties(wxCommandEvent& WXUNUSED (event))
return;
CISOProperties ISOProperties(iso->GetFileName(), this);
if(ISOProperties.ShowModal() == wxID_OK)
if (ISOProperties.ShowModal() == wxID_OK)
Update();
}

View file

@ -75,7 +75,7 @@ void HotkeyConfigDialog::EndGetButtons(void)
void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
{
if(ClickedButton != nullptr)
if (ClickedButton != nullptr)
{
// Save the key
g_Pressed = event.GetKeyCode();
@ -136,9 +136,9 @@ void HotkeyConfigDialog::DoGetButtons(int _GetId)
const int TimesPerSecond = 40; // How often to run the check
// If the Id has changed or the timer is not running we should start one
if( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
if ( GetButtonWaitingID != _GetId || !m_ButtonMappingTimer->IsRunning() )
{
if(m_ButtonMappingTimer->IsRunning())
if (m_ButtonMappingTimer->IsRunning())
m_ButtonMappingTimer->Stop();
// Save the button Id

View file

@ -169,7 +169,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
{
char tmp[17];
u8 _tTitleID[8];
if(OpenISO->GetTitleID(_tTitleID))
if (OpenISO->GetTitleID(_tTitleID))
{
snprintf(tmp, 17, "%016" PRIx64, Common::swap64(_tTitleID));
_iniFilename = tmp;
@ -330,7 +330,7 @@ size_t CISOProperties::CreateDirectoryTree(wxTreeItemId& parent,
char *itemName = strrchr(name, DIR_SEP_CHR);
if(!itemName)
if (!itemName)
itemName = name;
else
itemName++;
@ -678,8 +678,8 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
wxMenu* popupMenu = new wxMenu;
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0 &&
m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
{
popupMenu->Append(IDM_EXTRACTDIR, _("Extract Partition..."));
}
@ -694,8 +694,8 @@ void CISOProperties::OnRightClickOnTree(wxTreeEvent& event)
popupMenu->Append(IDM_EXTRACTALL, _("Extract All Files..."));
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0
&& m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
if (m_Treectrl->GetItemImage(m_Treectrl->GetSelection()) == 0 &&
m_Treectrl->GetFirstVisibleItem() != m_Treectrl->GetSelection())
{
popupMenu->AppendSeparator();
popupMenu->Append(IDM_EXTRACTAPPLOADER, _("Extract Apploader..."));
@ -772,7 +772,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
}
else // Look for the dir we are going to extract
{
for(index[0] = 0; index[0] < fst.size(); index[0]++)
for (index[0] = 0; index[0] < fst.size(); index[0]++)
{
if (!strcmp(fst.at(index[0])->m_FullPath, _rFullPath))
{
@ -896,7 +896,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
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)
if (WiiDisc.size() > partitionNum)
{
// Get the filesystem of the LAST partition
FS = WiiDisc.at(partitionNum).FileSystem;
@ -1153,10 +1153,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
withApplication: @"TextEdit"];
#else
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini"));
if(filetype == nullptr) // From extension failed, trying with MIME type now
if (filetype == nullptr) // From extension failed, trying with MIME type now
{
filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_T("text/plain"));
if(filetype == nullptr) // MIME type failed, aborting mission
if (filetype == nullptr) // MIME type failed, aborting mission
{
PanicAlertT("Filetype 'ini' is unknown! Will not open!");
return;
@ -1164,10 +1164,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
}
wxString OpenCommand;
OpenCommand = filetype->GetOpenCommand(StrToWxStr(filename));
if(OpenCommand.IsEmpty())
if (OpenCommand.IsEmpty())
PanicAlertT("Couldn't find open command for extension 'ini'!");
else
if(wxExecute(OpenCommand, wxEXEC_SYNC) == -1)
if (wxExecute(OpenCommand, wxEXEC_SYNC) == -1)
PanicAlertT("wxExecute returned -1 on application run!");
#endif
@ -1201,8 +1201,8 @@ void CISOProperties::ListSelectionChanged(wxCommandEvent& event)
switch (event.GetId())
{
case ID_PATCHES_LIST:
if (Patches->GetSelection() == wxNOT_FOUND
|| DefaultPatches.find(Patches->GetString(Patches->GetSelection()).ToStdString()) != DefaultPatches.end())
if (Patches->GetSelection() == wxNOT_FOUND ||
DefaultPatches.find(Patches->GetString(Patches->GetSelection()).ToStdString()) != DefaultPatches.end())
{
EditPatch->Disable();
RemovePatch->Disable();
@ -1214,8 +1214,8 @@ void CISOProperties::ListSelectionChanged(wxCommandEvent& event)
}
break;
case ID_CHEATS_LIST:
if (Cheats->GetSelection() == wxNOT_FOUND
|| DefaultCheats.find(Cheats->GetString(Cheats->GetSelection()).ToStdString()) != DefaultCheats.end())
if (Cheats->GetSelection() == wxNOT_FOUND ||
DefaultCheats.find(Cheats->GetString(Cheats->GetSelection()).ToStdString()) != DefaultCheats.end())
{
EditCheat->Disable();
RemoveCheat->Disable();

View file

@ -424,7 +424,7 @@ void DolphinApp::InitLanguageSupport()
ini.Get("Interface", "Language", &language, wxLANGUAGE_DEFAULT);
// Load language if possible, fall back to system default otherwise
if(wxLocale::IsAvailable(language))
if (wxLocale::IsAvailable(language))
{
m_locale = new wxLocale(language);
@ -434,7 +434,7 @@ void DolphinApp::InitLanguageSupport()
m_locale->AddCatalog(wxT("dolphin-emu"));
if(!m_locale->IsOk())
if (!m_locale->IsOk())
{
PanicAlertT("Error loading selected language. Falling back to system default.");
delete m_locale;
@ -688,7 +688,7 @@ void Host_SetWiiMoteConnectionState(int _State)
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATESTATUSBAR);
switch(_State)
switch (_State)
{
case 0: event.SetString(_("Not connected")); break;
case 1: event.SetString(_("Connecting...")); break;

View file

@ -178,7 +178,7 @@ void X11_MainLoop()
for (int num_events = XPending(dpy); num_events > 0; num_events--)
{
XNextEvent(dpy, &event);
switch(event.type)
switch (event.type)
{
case KeyPress:
key = XLookupKeysym((XKeyEvent*)&event, 0);
@ -269,7 +269,7 @@ void X11_MainLoop()
void Wayland_MainLoop()
{
// Wait for display to be initialized
while(!GLWin.wl_display)
while (!GLWin.wl_display)
usleep(20000);
GLWin.running = 1;

View file

@ -165,7 +165,7 @@ bool CMemcardManager::LoadSettings()
mcmSettings.column[NUMBER_OF_COLUMN] = false;
for(int i = COLUMN_GAMECODE; i < NUMBER_OF_COLUMN; i++)
for (int i = COLUMN_GAMECODE; i < NUMBER_OF_COLUMN; i++)
{
mcmSettings.column[i] = mcmSettings.column[NUMBER_OF_COLUMN];
}
@ -300,7 +300,7 @@ void CMemcardManager::ChangePath(int slot)
}
if (!m_MemcardPath[SLOT_A]->GetPath().CmpNoCase(m_MemcardPath[SLOT_B]->GetPath()))
{
if(m_MemcardPath[slot]->GetPath().length())
if (m_MemcardPath[slot]->GetPath().length())
PanicAlertT("Memcard already opened");
}
else
@ -384,7 +384,7 @@ void CMemcardManager::OnPageChange(wxCommandEvent& event)
void CMemcardManager::OnMenuChange(wxCommandEvent& event)
{
int _id = event.GetId();
switch(_id)
switch (_id)
{
case ID_MEMCARDPATH_A:
case ID_MEMCARDPATH_B:
@ -601,8 +601,8 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
SplitPath(mpath, &path1, &path2, nullptr);
path1 += path2;
File::CreateDir(path1);
if(PanicYesNoT("Warning: This will overwrite any existing saves that are in the folder:\n"
"%s\nand have the same name as a file on your memcard\nContinue?", path1.c_str()))
if (PanicYesNoT("Warning: This will overwrite any existing saves that are in the folder:\n"
"%s\nand have the same name as a file on your memcard\nContinue?", path1.c_str()))
for (int i = 0; i < DIRLEN; i++)
{
CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, nullptr, path1), -1);

View file

@ -303,7 +303,7 @@ void CWiiSaveCrypted::ImportWiiSaveFiles()
FileHDR _tmpFileHDR;
for(u32 i = 0; i < _numberOfFiles; i++)
for (u32 i = 0; i < _numberOfFiles; i++)
{
memset(&_tmpFileHDR, 0, FILE_HDR_SZ);
memset(IV, 0, 0x10);
@ -365,7 +365,7 @@ void CWiiSaveCrypted::ExportWiiSaveFiles()
{
if (!b_valid) return;
for(u32 i = 0; i < _numberOfFiles; i++)
for (u32 i = 0; i < _numberOfFiles; i++)
{
FileHDR tmpFileHDR;
std::string __name;
@ -558,14 +558,14 @@ bool CWiiSaveCrypted::getPaths(bool forExport)
(u8)(m_TitleID >> 24) & 0xFF, (u8)(m_TitleID >> 16) & 0xFF,
(u8)(m_TitleID >> 8) & 0xFF, (u8)m_TitleID & 0xFF);
if(!File::IsDirectory(WiiTitlePath))
if (!File::IsDirectory(WiiTitlePath))
{
b_valid = false;
PanicAlertT("No save folder found for title %s", GameID);
return false;
}
if(!File::Exists(WiiTitlePath + "banner.bin"))
if (!File::Exists(WiiTitlePath + "banner.bin"))
{
b_valid = false;
PanicAlertT("No banner file found for title %s", GameID);

View file

@ -277,7 +277,7 @@ void NetPlaySetupDiag::OnHost(wxCommandEvent&)
if (netplay_server->is_connected)
{
#ifdef USE_UPNP
if(m_upnp_chk->GetValue())
if (m_upnp_chk->GetValue())
netplay_server->TryPortmapping(port);
#endif
MakeNetPlayDiag(port, game, true);

View file

@ -244,148 +244,148 @@ void TASInputDlg::ResetValues()
void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
{
if(PadStatus->stickX != 128)
if (PadStatus->stickX != 128)
{
mainX = PadStatus->stickX;
mstickx = true;
wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX));
}
else if(mstickx)
else if (mstickx)
{
mstickx = false;
mainX = 128;
wx_mainX_t->SetValue(wxString::Format(wxT("%i"), mainX));
}
if(PadStatus->stickY != 128)
if (PadStatus->stickY != 128)
{
mainY = PadStatus->stickY;
msticky = true;
wx_mainY_t->SetValue(wxString::Format(wxT("%i"),mainY));
}
else if(msticky)
else if (msticky)
{
msticky = false;
mainY = 128;
wx_mainY_t->SetValue(wxString::Format(wxT("%i"), mainY));
}
if(PadStatus->substickX != 128)
if (PadStatus->substickX != 128)
{
cX = PadStatus->substickX;
cstickx = true;
wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX));
}
else if(cstickx)
else if (cstickx)
{
cstickx = false;
cX = 128;
wx_cX_t->SetValue(wxString::Format(wxT("%i"), cX));
}
if(PadStatus->substickY != 128)
if (PadStatus->substickY != 128)
{
cY = PadStatus->substickY;
csticky = true;
wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY));
}
else if(csticky)
else if (csticky)
{
csticky = false;
cY = 128;
wx_cY_t->SetValue(wxString::Format(wxT("%i"), cY));
}
if(((PadStatus->button & PAD_BUTTON_UP) != 0))
if ((PadStatus->button & PAD_BUTTON_UP) != 0)
{
wx_up_button->SetValue(true);
DU_cont = true;
}
else if(DU_cont)
else if (DU_cont)
{
wx_up_button->SetValue(false);
DU_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_DOWN) != 0))
if ((PadStatus->button & PAD_BUTTON_DOWN) != 0)
{
wx_down_button->SetValue(true);
DD_cont = true;
}
else if(DD_cont)
else if (DD_cont)
{
wx_down_button->SetValue(false);
DD_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_LEFT) != 0))
if ((PadStatus->button & PAD_BUTTON_LEFT) != 0)
{
wx_left_button->SetValue(true);
DL_cont = true;
}
else if(DL_cont)
else if (DL_cont)
{
wx_left_button->SetValue(false);
DL_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_RIGHT) != 0))
if ((PadStatus->button & PAD_BUTTON_RIGHT) != 0)
{
wx_right_button->SetValue(true);
DR_cont = true;
}
else if(DR_cont)
else if (DR_cont)
{
wx_right_button->SetValue(false);
DR_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_A) != 0))
if ((PadStatus->button & PAD_BUTTON_A) != 0)
{
wx_a_button->SetValue(true);
A_cont = true;
}
else if(A_cont)
else if (A_cont)
{
wx_a_button->SetValue(false);
A_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_B) != 0))
if ((PadStatus->button & PAD_BUTTON_B) != 0)
{
wx_b_button->SetValue(true);
B_cont = true;
}
else if(B_cont)
else if (B_cont)
{
wx_b_button->SetValue(false);
B_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_X) != 0))
if ((PadStatus->button & PAD_BUTTON_X) != 0)
{
wx_x_button->SetValue(true);
X_cont = true;
}
else if(X_cont)
else if (X_cont)
{
wx_x_button->SetValue(false);
X_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_Y) != 0))
if ((PadStatus->button & PAD_BUTTON_Y) != 0)
{
wx_y_button->SetValue(true);
Y_cont = true;
}
else if(Y_cont)
else if (Y_cont)
{
wx_y_button->SetValue(false);
Y_cont = false;
}
if(((PadStatus->triggerLeft) != 0))
if ((PadStatus->triggerLeft) != 0)
{
if (PadStatus->triggerLeft == 255)
{
@ -402,7 +402,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
wx_l_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerLeft));
L_cont = true;
}
else if(L_cont)
else if (L_cont)
{
wx_l_button->SetValue(false);
wx_l_s->SetValue(0);
@ -410,7 +410,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
L_cont = false;
}
if(((PadStatus->triggerRight) != 0))
if ((PadStatus->triggerRight) != 0)
{
if (PadStatus->triggerRight == 255)
{
@ -427,7 +427,7 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
wx_r_t->SetValue(wxString::Format(wxT("%i"), PadStatus->triggerRight));
R_cont = true;
}
else if(R_cont)
else if (R_cont)
{
wx_r_button->SetValue(false);
wx_r_s->SetValue(0);
@ -435,23 +435,23 @@ void TASInputDlg::GetKeyBoardInput(SPADStatus *PadStatus)
R_cont = false;
}
if(((PadStatus->button & PAD_TRIGGER_Z) != 0))
if ((PadStatus->button & PAD_TRIGGER_Z) != 0)
{
wx_z_button->SetValue(true);
Z_cont = true;
}
else if(Z_cont)
else if (Z_cont)
{
wx_z_button->SetValue(false);
Z_cont = false;
}
if(((PadStatus->button & PAD_BUTTON_START) != 0))
if ((PadStatus->button & PAD_BUTTON_START) != 0)
{
wx_start_button->SetValue(true);
START_cont = true;
}
else if(START_cont)
else if (START_cont)
{
wx_start_button->SetValue(false);
START_cont = false;
@ -487,27 +487,27 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
PadStatus->triggerLeft = lTrig;
PadStatus->triggerRight = rTrig;
if(wx_up_button->IsChecked())
if (wx_up_button->IsChecked())
PadStatus->button |= PAD_BUTTON_UP;
else
PadStatus->button &= ~PAD_BUTTON_UP;
if(wx_down_button->IsChecked())
if (wx_down_button->IsChecked())
PadStatus->button |= PAD_BUTTON_DOWN;
else
PadStatus->button &= ~PAD_BUTTON_DOWN;
if(wx_left_button->IsChecked())
if (wx_left_button->IsChecked())
PadStatus->button |= PAD_BUTTON_LEFT;
else
PadStatus->button &= ~PAD_BUTTON_LEFT;
if(wx_right_button->IsChecked())
if (wx_right_button->IsChecked())
PadStatus->button |= PAD_BUTTON_RIGHT;
else
PadStatus->button &= ~PAD_BUTTON_RIGHT;
if(wx_a_button->IsChecked())
if (wx_a_button->IsChecked())
{
PadStatus->button |= PAD_BUTTON_A;
PadStatus->analogA = 0xFF;
@ -518,7 +518,7 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
PadStatus->analogA = 0x00;
}
if(wx_b_button->IsChecked())
if (wx_b_button->IsChecked())
{
PadStatus->button |= PAD_BUTTON_B;
PadStatus->analogB = 0xFF;
@ -529,32 +529,32 @@ void TASInputDlg::GetValues(SPADStatus *PadStatus, int controllerID)
PadStatus->analogB = 0x00;
}
if(wx_x_button->IsChecked())
if (wx_x_button->IsChecked())
PadStatus->button |= PAD_BUTTON_X;
else
PadStatus->button &= ~PAD_BUTTON_X;
if(wx_y_button->IsChecked())
if (wx_y_button->IsChecked())
PadStatus->button |= PAD_BUTTON_Y;
else
PadStatus->button &= ~PAD_BUTTON_Y;
if(wx_z_button->IsChecked())
if (wx_z_button->IsChecked())
PadStatus->button |= PAD_TRIGGER_Z;
else
PadStatus->button &= ~PAD_TRIGGER_Z;
if(wx_start_button->IsChecked())
if (wx_start_button->IsChecked())
PadStatus->button |= PAD_BUTTON_START;
else
PadStatus->button &= ~PAD_BUTTON_START;
if(wx_r_button->IsChecked() || rTrig >= 255)
if (wx_r_button->IsChecked() || rTrig >= 255)
PadStatus->button |= PAD_TRIGGER_R;
else
PadStatus->button &= ~PAD_TRIGGER_R;
if(wx_l_button->IsChecked() || lTrig >= 255)
if (wx_l_button->IsChecked() || lTrig >= 255)
PadStatus->button |= PAD_TRIGGER_L;
else
PadStatus->button &= ~PAD_TRIGGER_L;
@ -568,7 +568,7 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
u8 *v;
update = 0;
switch(event.GetId())
switch (event.GetId())
{
case ID_MAIN_X_SLIDER:
text = wx_mainX_t;
@ -616,12 +616,12 @@ void TASInputDlg::UpdateFromSliders(wxCommandEvent& event)
*v = (u8) value;
text->SetValue(wxString::Format(wxT("%i"), value));
if(update == 1)
if (update == 1)
{
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis, yaxis));
}
if(update == 2)
if (update == 2)
{
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis, c_yaxis));
}
@ -634,7 +634,7 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
update = 0;
update_axis = 0;
switch(event.GetId())
switch (event.GetId())
{
case ID_MAIN_X_TEXT:
slider = wx_mainX_s;
@ -684,31 +684,28 @@ void TASInputDlg::UpdateFromText(wxCommandEvent& event)
*v = (u8) (value > 255 ? 255 : value);
slider->SetValue(*v);
if(update == 1)
if (update == 1)
{
if (update_axis == 1)
{
if(update_axis == 1)
{
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));
}
xaxis = *v;
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
}
else if (update_axis == 2)
{
yaxis =256 - *v;
static_bitmap_main->SetBitmap(TASInputDlg::CreateStickBitmap(xaxis,yaxis));
}
if(update == 2)
}
else if (update == 2)
{
if(update_axis == 1)
if (update_axis == 1)
{
c_xaxis = *v;
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
}
if(update_axis == 2)
else if (update_axis == 2)
{
c_yaxis =256- *v;
static_bitmap_c->SetBitmap(TASInputDlg::CreateStickBitmap(c_xaxis,c_yaxis));
@ -731,13 +728,13 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event)
bool TASInputDlg::TASHasFocus()
{
//allows numbers to be used as hotkeys
if(TextBoxHasFocus())
if (TextBoxHasFocus())
return false;
if (wxWindow::FindFocus() == this)
return true;
else if (wxWindow::FindFocus() != nullptr &&
wxWindow::FindFocus()->GetParent() == this)
wxWindow::FindFocus()->GetParent() == this)
return true;
else
return false;
@ -745,22 +742,22 @@ bool TASInputDlg::TASHasFocus()
bool TASInputDlg::TextBoxHasFocus()
{
if(wxWindow::FindFocus() == wx_mainX_t)
if (wxWindow::FindFocus() == wx_mainX_t)
return true;
if(wxWindow::FindFocus() == wx_mainY_t)
if (wxWindow::FindFocus() == wx_mainY_t)
return true;
if(wxWindow::FindFocus() == wx_cX_t)
if (wxWindow::FindFocus() == wx_cX_t)
return true;
if(wxWindow::FindFocus() == wx_cY_t)
if (wxWindow::FindFocus() == wx_cY_t)
return true;
if(wxWindow::FindFocus() == wx_l_t)
if (wxWindow::FindFocus() == wx_l_t)
return true;
if(wxWindow::FindFocus() == wx_r_t)
if (wxWindow::FindFocus() == wx_r_t)
return true;
return false;
@ -773,7 +770,7 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event)
wxTextCtrl *textX, *textY;
int *x,*y;
switch(event.GetId())
switch (event.GetId())
{
case ID_MAIN_STICK:
sliderX = wx_mainX_s;
@ -823,7 +820,7 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
wxTextCtrl *textX, *textY;
int *x,*y;
switch(event.GetId())
switch (event.GetId())
{
case ID_MAIN_STICK:
sliderX = wx_mainX_s;
@ -853,10 +850,10 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
*x = ptM.x *2;
*y = ptM.y * 2;
if(*x > 255)
if (*x > 255)
*x = 255;
if(*y > 255)
if (*y > 255)
*y = 255;
sbitmap->SetBitmap(TASInputDlg::CreateStickBitmap(*x,*y));
@ -871,7 +868,7 @@ void TASInputDlg::OnMouseDownL(wxMouseEvent& event)
void TASInputDlg::SetTurboFalse(wxMouseEvent& event)
{
switch(event.GetId())
switch (event.GetId())
{
case ID_A:
A_turbo = false;
@ -932,12 +929,12 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
{
wxCheckBox* placeholder;
switch(event.GetId())
switch (event.GetId())
{
case ID_A:
placeholder = wx_a_button;
if(A_turbo)
if (A_turbo)
A_turbo = false;
else
A_turbo = true;
@ -945,7 +942,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_B:
placeholder = wx_b_button;
if(B_turbo)
if (B_turbo)
B_turbo = false;
else
B_turbo = true;
@ -953,7 +950,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_X:
placeholder = wx_x_button;
if(X_turbo)
if (X_turbo)
X_turbo = false;
else
X_turbo = true;
@ -961,7 +958,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_Y:
placeholder = wx_y_button;
if(Y_turbo)
if (Y_turbo)
Y_turbo = false;
else
Y_turbo = true;
@ -969,7 +966,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_Z:
placeholder = wx_z_button;
if(Z_turbo)
if (Z_turbo)
Z_turbo = false;
else
Z_turbo = true;
@ -977,7 +974,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_L:
placeholder = wx_l_button;
if(L_turbo)
if (L_turbo)
L_turbo = false;
else
L_turbo = true;
@ -985,7 +982,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_R:
placeholder = wx_r_button;
if(R_turbo)
if (R_turbo)
R_turbo = false;
else
R_turbo = true;
@ -993,7 +990,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_START:
placeholder = wx_start_button;
if(START_turbo)
if (START_turbo)
START_turbo = false;
else
START_turbo = true;
@ -1001,7 +998,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_UP:
placeholder = wx_up_button;
if(DU_turbo)
if (DU_turbo)
DU_turbo = false;
else
DU_turbo = true;
@ -1009,7 +1006,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_DOWN:
placeholder = wx_down_button;
if(DD_turbo)
if (DD_turbo)
DD_turbo = false;
else
DD_turbo = true;
@ -1017,7 +1014,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_LEFT:
placeholder = wx_left_button;
if(DL_turbo)
if (DL_turbo)
DL_turbo = false;
else
DL_turbo = true;
@ -1025,7 +1022,7 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
case ID_RIGHT:
placeholder = wx_right_button;
if(DR_turbo)
if (DR_turbo)
DR_turbo = false;
else
DR_turbo = true;
@ -1038,97 +1035,97 @@ void TASInputDlg::SetTurbo(wxMouseEvent& event)
void TASInputDlg::ButtonTurbo()
{
if(A_turbo)
if (A_turbo)
{
if(wx_a_button->GetValue())
if (wx_a_button->GetValue())
wx_a_button->SetValue(false);
else
wx_a_button->SetValue(true);
}
if(B_turbo)
if (B_turbo)
{
if(wx_b_button->GetValue())
if (wx_b_button->GetValue())
wx_b_button->SetValue(false);
else
wx_b_button->SetValue(true);
}
if(X_turbo)
if (X_turbo)
{
if(wx_x_button->GetValue())
if (wx_x_button->GetValue())
wx_x_button->SetValue(false);
else
wx_x_button->SetValue(true);
}
if(Y_turbo)
if (Y_turbo)
{
if(wx_y_button->GetValue())
if (wx_y_button->GetValue())
wx_y_button->SetValue(false);
else
wx_y_button->SetValue(true);
}
if(Z_turbo)
if (Z_turbo)
{
if(wx_z_button->GetValue())
if (wx_z_button->GetValue())
wx_z_button->SetValue(false);
else
wx_z_button->SetValue(true);
}
if(L_turbo)
if (L_turbo)
{
if(wx_l_button->GetValue())
if (wx_l_button->GetValue())
wx_l_button->SetValue(false);
else
wx_l_button->SetValue(true);
}
if(R_turbo)
if (R_turbo)
{
if(wx_r_button->GetValue())
if (wx_r_button->GetValue())
wx_r_button->SetValue(false);
else
wx_r_button->SetValue(true);
}
if(START_turbo)
if (START_turbo)
{
if(wx_start_button->GetValue())
if (wx_start_button->GetValue())
wx_start_button->SetValue(false);
else
wx_start_button->SetValue(true);
}
if(DU_turbo)
if (DU_turbo)
{
if(wx_up_button->GetValue())
if (wx_up_button->GetValue())
wx_up_button->SetValue(false);
else
wx_up_button->SetValue(true);
}
if(DD_turbo)
if (DD_turbo)
{
if(wx_down_button->GetValue())
if (wx_down_button->GetValue())
wx_down_button->SetValue(false);
else
wx_down_button->SetValue(true);
}
if(DL_turbo)
if (DL_turbo)
{
if(wx_left_button->GetValue())
if (wx_left_button->GetValue())
wx_left_button->SetValue(false);
else
wx_left_button->SetValue(true);
}
if(DR_turbo)
if (DR_turbo)
{
if(wx_right_button->GetValue())
if (wx_right_button->GetValue())
wx_right_button->SetValue(false);
else
wx_right_button->SetValue(true);

View file

@ -246,7 +246,7 @@ void WiimoteConfigDiag::SelectSource(wxCommandEvent& event)
// Revert if the dialog is canceled.
int index = m_wiimote_index_from_ctrl_id[event.GetId()];
if(index != WIIMOTE_BALANCE_BOARD)
if (index != WIIMOTE_BALANCE_BOARD)
{
WiimoteReal::ChangeWiimoteSource(index, event.GetInt());
if (g_wiimote_sources[index] != WIIMOTE_SRC_EMU && g_wiimote_sources[index] != WIIMOTE_SRC_HYBRID)

View file

@ -57,8 +57,9 @@ void SendMotionEvent(Display *dpy, int x, int y)
void EWMH_Fullscreen(Display *dpy, int action)
{
_assert_(action == _NET_WM_STATE_REMOVE || action == _NET_WM_STATE_ADD
|| action == _NET_WM_STATE_TOGGLE);
_assert_(action == _NET_WM_STATE_REMOVE ||
action == _NET_WM_STATE_ADD ||
action == _NET_WM_STATE_TOGGLE);
Window win = (Window)Core::GetWindowHandle();
@ -73,7 +74,7 @@ void EWMH_Fullscreen(Display *dpy, int action)
// Send the event
if (!XSendEvent(dpy, DefaultRootWindow(dpy), False,
SubstructureRedirectMask | SubstructureNotifyMask, &event))
SubstructureRedirectMask | SubstructureNotifyMask, &event))
ERROR_LOG(VIDEO, "Failed to switch fullscreen/windowed mode.");
}
@ -156,7 +157,7 @@ XRRConfiguration::~XRRConfiguration()
void XRRConfiguration::Update()
{
if(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
return;
if (!bValid)