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; wxSpinButton *EntrySelection;
wxTextCtrl *EditCheatCode; wxTextCtrl *EditCheatCode;
enum { enum
{
ID_EDITCHEAT_NAME_TEXT = 4550, ID_EDITCHEAT_NAME_TEXT = 4550,
ID_EDITCHEAT_NAME, ID_EDITCHEAT_NAME,
ID_ENTRY_SELECT, ID_ENTRY_SELECT,

View File

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

View File

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

View File

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

View File

@ -32,12 +32,14 @@ class wxWindow;
class CRegTable : public wxGridTableBase class CRegTable : public wxGridTableBase
{ {
enum { enum
{
NUM_SPECIALS = 11, NUM_SPECIALS = 11,
}; };
public: public:
CRegTable() { CRegTable()
{
memset(m_CachedRegs, 0, sizeof(m_CachedRegs)); memset(m_CachedRegs, 0, sizeof(m_CachedRegs));
memset(m_CachedSpecialRegs, 0, sizeof(m_CachedSpecialRegs)); memset(m_CachedSpecialRegs, 0, sizeof(m_CachedSpecialRegs));
memset(m_CachedFRegs, 0, sizeof(m_CachedFRegs)); memset(m_CachedFRegs, 0, sizeof(m_CachedFRegs));
@ -45,6 +47,7 @@ public:
memset(m_CachedSpecialRegHasChanged, 0, sizeof(m_CachedSpecialRegHasChanged)); memset(m_CachedSpecialRegHasChanged, 0, sizeof(m_CachedSpecialRegHasChanged));
memset(m_CachedFRegHasChanged, 0, sizeof(m_CachedFRegHasChanged)); memset(m_CachedFRegHasChanged, 0, sizeof(m_CachedFRegHasChanged));
} }
int GetNumberCols() override { return 5; } int GetNumberCols() override { return 5; }
int GetNumberRows() override { return 32 + NUM_SPECIALS; } int GetNumberRows() override { return 32 + NUM_SPECIALS; }
bool IsEmptyCell(int row, int col) override { return row > 31 && col > 2; } 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(); drives = cdio_get_devices();
// Windows Limitation of 24 character drives // 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])); 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 }; NSOpenGLPixelFormatAttribute attr[] = { NSOpenGLPFADoubleBuffer, NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core, NSOpenGLPFAAccelerated, 0 };
NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc] NSOpenGLPixelFormat *fmt = [[NSOpenGLPixelFormat alloc]
initWithAttributes: attr]; initWithAttributes: attr];
if (fmt == nil) { if (fmt == nil)
{
ERROR_LOG(VIDEO, "failed to create pixel format"); ERROR_LOG(VIDEO, "failed to create pixel format");
return false; return false;
} }
cocoaCtx = [[NSOpenGLContext alloc] cocoaCtx = [[NSOpenGLContext alloc] initWithFormat: fmt shareContext: nil];
initWithFormat: fmt shareContext: nil];
[fmt release]; [fmt release];
if (cocoaCtx == nil) { if (cocoaCtx == nil)
{
ERROR_LOG(VIDEO, "failed to create context"); ERROR_LOG(VIDEO, "failed to create context");
return false; return false;
} }
if (cocoaWin == nil) { if (cocoaWin == nil)
{
ERROR_LOG(VIDEO, "failed to create window"); ERROR_LOG(VIDEO, "failed to create window");
return false; return false;
} }

View File

@ -84,7 +84,9 @@ bool cInterfaceGLX::Create(void *window_handle)
} }
} }
else else
{
NOTICE_LOG(VIDEO, "Got double buffered visual!"); NOTICE_LOG(VIDEO, "Got double buffered visual!");
}
// Create a GLX context. // Create a GLX context.
ctx = glXCreateContext(dpy, vi, nullptr, GL_TRUE); 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 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."); PanicAlert("(1) Can't create an OpenGL Device context. Fail.");
return false; return false;
} }
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd))) {
if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd)))
{
PanicAlert("(2) Can't find a suitable PixelFormat."); PanicAlert("(2) Can't find a suitable PixelFormat.");
return false; return false;
} }
if (!SetPixelFormat(hDC, PixelFormat, &pfd)) {
if (!SetPixelFormat(hDC, PixelFormat, &pfd))
{
PanicAlert("(3) Can't set the PixelFormat."); PanicAlert("(3) Can't set the PixelFormat.");
return false; return false;
} }
if (!(hRC = wglCreateContext(hDC))) {
if (!(hRC = wglCreateContext(hDC)))
{
PanicAlert("(4) Can't create an OpenGL rendering context."); PanicAlert("(4) Can't create an OpenGL rendering context.");
return false; return false;
} }

View File

@ -60,13 +60,14 @@ void cX11Window::XEventThread()
for (int num_events = XPending(dpy); num_events > 0; num_events--) for (int num_events = XPending(dpy); num_events > 0; num_events--)
{ {
XNextEvent(dpy, &event); XNextEvent(dpy, &event);
switch (event.type) { switch (event.type)
case ConfigureNotify: {
XResizeWindow(dpy, win, event.xconfigure.width, event.xconfigure.height); case ConfigureNotify:
GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height); XResizeWindow(dpy, win, event.xconfigure.width, event.xconfigure.height);
break; GLInterface->SetBackBufferDimensions(event.xconfigure.width, event.xconfigure.height);
default: break;
break; default:
break;
} }
} }
Common::SleepCurrentThread(20); Common::SleepCurrentThread(20);

View File

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

View File

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

View File

@ -87,7 +87,7 @@ XRRConfiguration::XRRConfiguration(Display *_dpy, Window _win)
int XRRMajorVersion, XRRMinorVersion; int XRRMajorVersion, XRRMinorVersion;
if (!XRRQueryVersion(dpy, &XRRMajorVersion, &XRRMinorVersion) || if (!XRRQueryVersion(dpy, &XRRMajorVersion, &XRRMinorVersion) ||
(XRRMajorVersion < 1 || (XRRMajorVersion == 1 && XRRMinorVersion < 3))) (XRRMajorVersion < 1 || (XRRMajorVersion == 1 && XRRMinorVersion < 3)))
{ {
WARN_LOG(VIDEO, "XRRExtension not supported."); WARN_LOG(VIDEO, "XRRExtension not supported.");
bValid = false; bValid = false;
@ -148,8 +148,10 @@ void XRRConfiguration::Update()
fullHeight = fb_height; fullHeight = fb_height;
} }
else else
{
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(), sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
"%m[^:]: %ux%u", &output_name, &fullWidth, &fullHeight); "%m[^:]: %ux%u", &output_name, &fullWidth, &fullHeight);
}
for (int i = 0; i < screenResources->noutput; i++) 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) if (output_info && output_info->crtc && output_info->connection == RR_Connected)
{ {
for (int j = 0; j < output_info->nmode; j++) for (int j = 0; j < output_info->nmode; j++)
{
for (int k = 0; k < screenResources->nmode; k++) for (int k = 0; k < screenResources->nmode; k++)
{
if (output_info->modes[j] == screenResources->modes[k].id) if (output_info->modes[j] == screenResources->modes[k].id)
{ {
const std::string strRes = const std::string strRes =
@ -274,6 +278,8 @@ void XRRConfiguration::AddResolutions(std::vector<std::string>& resos)
resos.push_back(strRes); resos.push_back(strRes);
} }
} }
}
}
} }
if (output_info) if (output_info)
XRRFreeOutputInfo(output_info); XRRFreeOutputInfo(output_info);