DolphinWX: Clean up brace placements

This commit is contained in:
Lioncash 2014-08-30 17:01:19 -04:00
parent 844d45b26e
commit 8553b0f27b
13 changed files with 58 additions and 28 deletions

View File

@ -35,7 +35,8 @@ class CARCodeAddEdit : public wxDialog
wxSpinButton *EntrySelection;
wxTextCtrl *EditCheatCode;
enum {
enum
{
ID_EDITCHEAT_NAME_TEXT = 4550,
ID_EDITCHEAT_NAME,
ID_ENTRY_SELECT,

View File

@ -377,7 +377,8 @@ void CCodeWindow::NotifyMapLoaded()
void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
{
int index = symbols->GetSelection();
if (index >= 0) {
if (index >= 0)
{
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
if (pSymbol != nullptr)
{

View File

@ -234,7 +234,8 @@ void DSPDebuggerLLE::UpdateSymbolMap()
void DSPDebuggerLLE::OnSymbolListChange(wxCommandEvent& event)
{
int index = m_SymbolList->GetSelection();
if (index >= 0) {
if (index >= 0)
{
Symbol* pSymbol = static_cast<Symbol *>(m_SymbolList->GetClientData(index));
if (pSymbol != nullptr)
{
@ -275,7 +276,8 @@ bool DSPDebuggerLLE::JumpToAddress(u16 addr)
{
// Center on valid instruction in IRAM/IROM
int new_line = DSPSymbols::Addr2Line(addr);
if (new_line >= 0) {
if (new_line >= 0)
{
m_CodeView->Center(new_line);
return true;
}

View File

@ -75,7 +75,8 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
sizerBig->Fit(this);
}
void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) {
void CJitWindow::OnRefresh(wxCommandEvent& /*event*/)
{
block_list->Update();
}
@ -212,7 +213,8 @@ void CJitWindow::OnHostMessage(wxCommandEvent& event)
// JitBlockList
//================
enum {
enum
{
COLUMN_ADDRESS,
COLUMN_PPCSIZE,
COLUMN_X86SIZE,

View File

@ -32,12 +32,14 @@ class wxWindow;
class CRegTable : public wxGridTableBase
{
enum {
enum
{
NUM_SPECIALS = 11,
};
public:
CRegTable() {
CRegTable()
{
memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
memset(m_CachedSpecialRegs, 0, sizeof(m_CachedSpecialRegs));
memset(m_CachedFRegs, 0, sizeof(m_CachedFRegs));
@ -45,6 +47,7 @@ public:
memset(m_CachedSpecialRegHasChanged, 0, sizeof(m_CachedSpecialRegHasChanged));
memset(m_CachedFRegHasChanged, 0, sizeof(m_CachedFRegHasChanged));
}
int GetNumberCols() override { return 5; }
int GetNumberRows() override { return 32 + NUM_SPECIALS; }
bool IsEmptyCell(int row, int col) override { return row > 31 && col > 2; }

View File

@ -126,7 +126,8 @@ void CFrame::CreateMenu()
drives = cdio_get_devices();
// Windows Limitation of 24 character drives
for (unsigned int i = 0; i < drives.size() && i < 24; i++) {
for (unsigned int i = 0; i < drives.size() && i < 24; i++)
{
externalDrive->Append(IDM_DRIVE1 + i, StrToWxStr(drives[i]));
}

View File

@ -39,20 +39,22 @@ bool cInterfaceAGL::Create(void *window_handle)
NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 };
NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
initWithAttributes: attr];
if (fmt == nil) {
if (fmt == nil)
{
ERROR_LOG(VIDEO, "failed to create pixel format");
return false;
}
cocoaCtx = [[NSOpenGLContext alloc]
initWithFormat: fmt shareContext: nil];
cocoaCtx = [[NSOpenGLContext alloc] initWithFormat: fmt shareContext: nil];
[fmt release];
if (cocoaCtx == nil) {
if (cocoaCtx == nil)
{
ERROR_LOG(VIDEO, "failed to create context");
return false;
}
if (cocoaWin == nil) {
if (cocoaWin == nil)
{
ERROR_LOG(VIDEO, "failed to create window");
return false;
}

View File

@ -84,7 +84,9 @@ bool cInterfaceGLX::Create(void *window_handle)
}
}
else
{
NOTICE_LOG(VIDEO, "Got double buffered visual!");
}
// Create a GLX context.
ctx = glXCreateContext(dpy, vi, nullptr, GL_TRUE);

View File

@ -104,19 +104,26 @@ bool cInterfaceWGL::Create(void *window_handle)
int PixelFormat; // Holds The Results After Searching For A Match
if (!(hDC = GetDC(window_handle_reified))) {
if (!(hDC = GetDC(window_handle_reified)))
{
PanicAlert("(1) Can't create an OpenGL Device context. Fail.");
return false;
}
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd))) {
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd)))
{
PanicAlert("(2) Can't find a suitable PixelFormat.");
return false;
}
if (!SetPixelFormat(hDC, PixelFormat, &pfd)) {
if (!SetPixelFormat(hDC, PixelFormat, &pfd))
{
PanicAlert("(3) Can't set the PixelFormat.");
return false;
}
if (!(hRC = wglCreateContext(hDC))) {
if (!(hRC = wglCreateContext(hDC)))
{
PanicAlert("(4) Can't create an OpenGL rendering context.");
return false;
}

View File

@ -60,7 +60,8 @@ void cX11Window::XEventThread()
for (int num_events = XPending(dpy); num_events > 0; num_events--)
{
XNextEvent(dpy, &event);
switch (event.type) {
switch (event.type)
{
case ConfigureNotify:
XResizeWindow(dpy, win, event.xconfigure.width, event.xconfigure.height);
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);

View File

@ -111,7 +111,8 @@ CFrame* main_frame = nullptr;
#ifdef WIN32
//Has no error handling.
//I think that if an error occurs here there's no way to handle it anyway.
LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e) {
LONG WINAPI MyUnhandledExceptionFilter(LPEXCEPTION_POINTERS e)
{
//EnterCriticalSection(&g_uefcs);
File::IOFile file("exceptioninfo.txt", "a");

View File

@ -44,7 +44,8 @@ class CPatchAddEdit : public wxDialog
wxButton *EntryRemove;
wxStaticBoxSizer* sbEntry;
enum {
enum
{
ID_EDITPATCH_NAME_TEXT = 4500,
ID_EDITPATCH_NAME,
ID_EDITPATCH_OFFSET_TEXT,

View File

@ -148,8 +148,10 @@ void XRRConfiguration::Update()
fullHeight = fb_height;
}
else
{
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
"%m[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
}
for (int i = 0; i < screenResources->noutput; i++)
{
@ -262,7 +264,9 @@ void XRRConfiguration::AddResolutions(std::vector<std::string>& resos)
if (output_info && output_info->crtc && output_info->connection == RR_Connected)
{
for (int j = 0; j < output_info->nmode; j++)
{
for (int k = 0; k < screenResources->nmode; k++)
{
if (output_info->modes[j] == screenResources->modes[k].id)
{
const std::string strRes =
@ -275,6 +279,8 @@ void XRRConfiguration::AddResolutions(std::vector<std::string>& resos)
}
}
}
}
}
if (output_info)
XRRFreeOutputInfo(output_info);
}