mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-10 18:18:49 +00:00
clang-modernize -use-nullptr
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
This commit is contained in:
parent
f28116b7da
commit
d802d39281
292 changed files with 1526 additions and 1526 deletions
|
@ -112,8 +112,8 @@ void CARCodeAddEdit::SaveCheatData(wxCommandEvent& WXUNUSED (event))
|
|||
if (pieces.size() == 2 && pieces[0].size() == 8 && pieces[1].size() == 8)
|
||||
{
|
||||
// Decrypted code line.
|
||||
u32 addr = strtoul(pieces[0].c_str(), NULL, 16);
|
||||
u32 value = strtoul(pieces[1].c_str(), NULL, 16);
|
||||
u32 addr = strtoul(pieces[0].c_str(), nullptr, 16);
|
||||
u32 value = strtoul(pieces[1].c_str(), nullptr, 16);
|
||||
|
||||
decryptedLines.push_back(ActionReplay::AREntry(addr, value));
|
||||
continue;
|
||||
|
|
|
@ -72,8 +72,8 @@ wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
|
|||
|
||||
wxCheatsWindow::~wxCheatsWindow()
|
||||
{
|
||||
main_frame->g_CheatsWindow = NULL;
|
||||
::g_cheat_window = NULL;
|
||||
main_frame->g_CheatsWindow = nullptr;
|
||||
::g_cheat_window = nullptr;
|
||||
}
|
||||
|
||||
void wxCheatsWindow::Init_ChildControls()
|
||||
|
@ -95,7 +95,7 @@ void wxCheatsWindow::Init_ChildControls()
|
|||
m_GroupBox_Info = new wxStaticBox(m_Tab_Cheats, wxID_ANY, _("Code Info"));
|
||||
|
||||
m_Label_NumCodes = new wxStaticText(m_Tab_Cheats, wxID_ANY, _("Number Of Codes: "));
|
||||
m_ListBox_CodesList = new wxListBox(m_Tab_Cheats, wxID_ANY, wxDefaultPosition, wxSize(120, 150), 0, 0, wxLB_HSCROLL);
|
||||
m_ListBox_CodesList = new wxListBox(m_Tab_Cheats, wxID_ANY, wxDefaultPosition, wxSize(120, 150), 0, nullptr, wxLB_HSCROLL);
|
||||
|
||||
wxStaticBoxSizer* sGroupBoxInfo = new wxStaticBoxSizer(m_GroupBox_Info, wxVERTICAL);
|
||||
sGroupBoxInfo->Add(m_Label_Codename, 0, wxALL, 5);
|
||||
|
@ -399,7 +399,7 @@ void wxCheatsWindow::OnEvent_CheckBoxEnableLogging_StateChange(wxCommandEvent& W
|
|||
void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
const u8* const memptr = Memory::GetPointer(0);
|
||||
if (NULL == memptr)
|
||||
if (nullptr == memptr)
|
||||
{
|
||||
PanicAlertT("A game is not currently running.");
|
||||
return;
|
||||
|
@ -433,7 +433,7 @@ void CheatSearchTab::StartNewSearch(wxCommandEvent& WXUNUSED (event))
|
|||
void CheatSearchTab::FilterCheatSearchResults(wxCommandEvent&)
|
||||
{
|
||||
const u8* const memptr = Memory::GetPointer(0);
|
||||
if (NULL == memptr)
|
||||
if (nullptr == memptr)
|
||||
{
|
||||
PanicAlertT("A game is not currently running.");
|
||||
return;
|
||||
|
|
|
@ -616,7 +616,7 @@ void CConfigMain::CreateGUIControls()
|
|||
std::for_each(sv.begin(), sv.end(), [theme_selection](const std::string& filename)
|
||||
{
|
||||
std::string name, ext;
|
||||
SplitPath(filename, NULL, &name, &ext);
|
||||
SplitPath(filename, nullptr, &name, &ext);
|
||||
|
||||
name += ext;
|
||||
auto const wxname = StrToWxStr(name);
|
||||
|
|
|
@ -335,7 +335,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
|||
|
||||
void CCodeView::OnMouseUpR(wxMouseEvent& event)
|
||||
{
|
||||
bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != 0;
|
||||
bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != nullptr;
|
||||
// popup menu
|
||||
wxMenu* menu = new wxMenu;
|
||||
//menu->Append(IDM_GOTOINMEMVIEW, "&Goto in mem view");
|
||||
|
@ -482,7 +482,7 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
|||
}
|
||||
if (!found)
|
||||
{
|
||||
mojs = 0;
|
||||
mojs = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,13 +89,13 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
|||
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
|
||||
: wxPanel((wxWindow*)parent, id, position, size, style, name)
|
||||
, Parent(parent)
|
||||
, m_RegisterWindow(NULL)
|
||||
, m_BreakpointWindow(NULL)
|
||||
, m_MemoryWindow(NULL)
|
||||
, m_JitWindow(NULL)
|
||||
, m_SoundWindow(NULL)
|
||||
, m_VideoWindow(NULL)
|
||||
, codeview(NULL)
|
||||
, m_RegisterWindow(nullptr)
|
||||
, m_BreakpointWindow(nullptr)
|
||||
, m_MemoryWindow(nullptr)
|
||||
, m_JitWindow(nullptr)
|
||||
, m_SoundWindow(nullptr)
|
||||
, m_VideoWindow(nullptr)
|
||||
, codeview(nullptr)
|
||||
{
|
||||
InitBitmaps();
|
||||
|
||||
|
@ -111,11 +111,11 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter
|
|||
sizerLeft->Add(callstack = new wxListBox(this, ID_CALLSTACKLIST,
|
||||
wxDefaultPosition, wxSize(90, 100)), 0, wxEXPAND);
|
||||
sizerLeft->Add(symbols = new wxListBox(this, ID_SYMBOLLIST,
|
||||
wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);
|
||||
wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 1, wxEXPAND);
|
||||
sizerLeft->Add(calls = new wxListBox(this, ID_CALLSLIST, wxDefaultPosition,
|
||||
wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||
wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
|
||||
sizerLeft->Add(callers = new wxListBox(this, ID_CALLERSLIST, wxDefaultPosition,
|
||||
wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);
|
||||
wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);
|
||||
|
||||
SetSizer(sizerBig);
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
|||
{
|
||||
case IDM_PROFILEBLOCKS:
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
if (jit != NULL)
|
||||
if (jit != nullptr)
|
||||
jit->ClearCache();
|
||||
Profiler::g_ProfileBlocks = GetMenuBar()->IsChecked(IDM_PROFILEBLOCKS);
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
|
@ -191,13 +191,13 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
|
|||
|
||||
if (Core::GetState() == Core::CORE_PAUSE && PowerPC::GetMode() == PowerPC::MODE_JIT)
|
||||
{
|
||||
if (jit != NULL)
|
||||
if (jit != nullptr)
|
||||
{
|
||||
std::string filename = File::GetUserPath(D_DUMP_IDX) + "Debug/profiler.txt";
|
||||
File::CreateFullPath(filename);
|
||||
Profiler::WriteProfileResults(filename.c_str());
|
||||
|
||||
wxFileType* filetype = NULL;
|
||||
wxFileType* filetype = nullptr;
|
||||
if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt"))))
|
||||
{
|
||||
// From extension failed, trying with MIME type now
|
||||
|
@ -379,7 +379,7 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
|||
int index = symbols->GetSelection();
|
||||
if (index >= 0) {
|
||||
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
if(pSymbol->type == Symbol::SYMBOL_DATA)
|
||||
{
|
||||
|
@ -456,7 +456,7 @@ void CCodeWindow::ToggleRegisterWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_RegisterWindow, false);
|
||||
m_RegisterWindow = NULL;
|
||||
m_RegisterWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ void CCodeWindow::ToggleBreakPointWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_BreakpointWindow, false);
|
||||
m_BreakpointWindow = NULL;
|
||||
m_BreakpointWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -492,7 +492,7 @@ void CCodeWindow::ToggleMemoryWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_MemoryWindow, false);
|
||||
m_MemoryWindow = NULL;
|
||||
m_MemoryWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ void CCodeWindow::ToggleJitWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_JitWindow, false);
|
||||
m_JitWindow = NULL;
|
||||
m_JitWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -529,7 +529,7 @@ void CCodeWindow::ToggleSoundWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_SoundWindow, false);
|
||||
m_SoundWindow = NULL;
|
||||
m_SoundWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -547,6 +547,6 @@ void CCodeWindow::ToggleVideoWindow(bool bShow)
|
|||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_VideoWindow, false);
|
||||
m_VideoWindow = NULL;
|
||||
m_VideoWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
class wxWindow;
|
||||
|
||||
DSPDebuggerLLE* m_DebuggerFrame = NULL;
|
||||
DSPDebuggerLLE* m_DebuggerFrame = nullptr;
|
||||
|
||||
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxPanel)
|
||||
EVT_CLOSE(DSPDebuggerLLE::OnClose)
|
||||
|
@ -69,7 +69,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
|||
m_Toolbar->Realize();
|
||||
|
||||
m_SymbolList = new wxListBox(this, ID_SYMBOLLIST, wxDefaultPosition,
|
||||
wxSize(140, 100), 0, NULL, wxLB_SORT);
|
||||
wxSize(140, 100), 0, nullptr, wxLB_SORT);
|
||||
|
||||
m_MainNotebook = new wxAuiNotebook(this, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
|
@ -118,7 +118,7 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
|||
DSPDebuggerLLE::~DSPDebuggerLLE()
|
||||
{
|
||||
m_mgr.UnInit();
|
||||
m_DebuggerFrame = NULL;
|
||||
m_DebuggerFrame = nullptr;
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::OnClose(wxCloseEvent& event)
|
||||
|
@ -217,7 +217,7 @@ void DSPDebuggerLLE::UpdateDisAsmListView()
|
|||
|
||||
void DSPDebuggerLLE::UpdateSymbolMap()
|
||||
{
|
||||
if (g_dsp.dram == NULL)
|
||||
if (g_dsp.dram == nullptr)
|
||||
return;
|
||||
|
||||
m_SymbolList->Freeze(); // HyperIris: wx style fast filling
|
||||
|
@ -235,7 +235,7 @@ void DSPDebuggerLLE::OnSymbolListChange(wxCommandEvent& event)
|
|||
int index = m_SymbolList->GetSelection();
|
||||
if (index >= 0) {
|
||||
Symbol* pSymbol = static_cast<Symbol *>(m_SymbolList->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
if (pSymbol->type == Symbol::SYMBOL_FUNCTION)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoin
|
|||
|
||||
GFXDebuggerPanel::~GFXDebuggerPanel()
|
||||
{
|
||||
g_pdebugger = NULL;
|
||||
g_pdebugger = nullptr;
|
||||
GFXDebuggerPauseFlag = false;
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ void GFXDebuggerPanel::CreateGUIControls()
|
|||
|
||||
m_pCount = new wxTextCtrl(this, ID_COUNT, wxT("1"), wxDefaultPosition, wxSize(50,25), wxTE_RIGHT, wxDefaultValidator, _("Count"));
|
||||
|
||||
m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, NULL,0,wxDefaultValidator, _("PauseAtList"));
|
||||
m_pPauseAtList = new wxChoice(this, ID_PAUSE_AT_LIST, wxDefaultPosition, wxSize(100,25), 0, nullptr,0,wxDefaultValidator, _("PauseAtList"));
|
||||
for (int i=0; i<numPauseEventMap; i++)
|
||||
{
|
||||
m_pPauseAtList->Append(pauseEventMap[i].ListStr);
|
||||
|
@ -168,7 +168,7 @@ void GFXDebuggerPanel::CreateGUIControls()
|
|||
m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders"));
|
||||
m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders"));
|
||||
|
||||
m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, NULL, 0 ,wxDefaultValidator, _("DumpList"));
|
||||
m_pDumpList = new wxChoice(this, ID_DUMP_LIST, wxDefaultPosition, wxSize(120,25), 0, nullptr, 0 ,wxDefaultValidator, _("DumpList"));
|
||||
m_pDumpList->Insert(_("Pixel Shader"),0);
|
||||
m_pDumpList->Append(_("Vertex Shader"));
|
||||
m_pDumpList->Append(_("Pixel Shader Constants"));
|
||||
|
|
|
@ -213,10 +213,10 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
|
|||
hFont.SetFamily(wxFONTFAMILY_TELETYPE);
|
||||
|
||||
wxCoord w,h;
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&hFont);
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&hFont);
|
||||
if (h > rowHeight)
|
||||
rowHeight = h;
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&DebuggerFont);
|
||||
dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&DebuggerFont);
|
||||
if (h > rowHeight)
|
||||
rowHeight = h;
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
|||
DebugInterface* di = &PowerPC::debug_interface;
|
||||
|
||||
//symbols = new wxListBox(this, IDM_SYMBOLLIST, wxDefaultPosition,
|
||||
// wxSize(20, 100), 0, NULL, wxLB_SORT);
|
||||
// wxSize(20, 100), 0, nullptr, wxLB_SORT);
|
||||
//sizerLeft->Add(symbols, 1, wxEXPAND);
|
||||
memview = new CMemoryView(di, this);
|
||||
memview->dataType = 0;
|
||||
|
@ -220,7 +220,7 @@ void CMemoryWindow::OnSymbolListChange(wxCommandEvent& event)
|
|||
if (index >= 0)
|
||||
{
|
||||
Symbol* pSymbol = static_cast<Symbol *>(symbols->GetClientData(index));
|
||||
if (pSymbol != NULL)
|
||||
if (pSymbol != nullptr)
|
||||
{
|
||||
memview->Center(pSymbol->address);
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ void CMemoryWindow::U32(wxCommandEvent& event)
|
|||
|
||||
void CMemoryWindow::onSearch(wxCommandEvent& event)
|
||||
{
|
||||
u8* TheRAM = 0;
|
||||
u8* TheRAM = nullptr;
|
||||
u32 szRAM = 0;
|
||||
switch (memview->GetMemoryType())
|
||||
{
|
||||
|
@ -331,8 +331,8 @@ void CMemoryWindow::onSearch(wxCommandEvent& event)
|
|||
long count = 0;
|
||||
char copy[3] = {0};
|
||||
long newsize = 0;
|
||||
unsigned char *tmp2 = 0;
|
||||
char* tmpstr = 0;
|
||||
unsigned char *tmp2 = nullptr;
|
||||
char* tmpstr = nullptr;
|
||||
|
||||
if (chkHex->GetValue())
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ CRegisterWindow::CRegisterWindow(wxWindow* parent, wxWindowID id,
|
|||
const wxPoint& position, const wxSize& size,
|
||||
long style, const wxString& name)
|
||||
: wxPanel(parent, id, position, size, style, name)
|
||||
, m_GPRGridView(NULL)
|
||||
, m_GPRGridView(nullptr)
|
||||
{
|
||||
CreateGUIControls();
|
||||
}
|
||||
|
@ -43,6 +43,6 @@ void CRegisterWindow::CreateGUIControls()
|
|||
|
||||
void CRegisterWindow::NotifyUpdate()
|
||||
{
|
||||
if (m_GPRGridView != NULL)
|
||||
if (m_GPRGridView != nullptr)
|
||||
m_GPRGridView->Update();
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ DEFINE_EVENT_TYPE(FRAME_WRITTEN_EVENT)
|
|||
using namespace std;
|
||||
|
||||
std::recursive_mutex sMutex;
|
||||
wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = NULL;
|
||||
wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = nullptr;
|
||||
|
||||
FifoPlayerDlg::FifoPlayerDlg(wxWindow * const parent) :
|
||||
wxDialog(parent, wxID_ANY, _("FIFO Player")),
|
||||
|
@ -90,10 +90,10 @@ FifoPlayerDlg::~FifoPlayerDlg()
|
|||
m_objectsList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectListSelectionChanged, this);
|
||||
m_objectCmdList->Unbind(wxEVT_COMMAND_LISTBOX_SELECTED, &FifoPlayerDlg::OnObjectCmdListSelectionChanged, this);
|
||||
|
||||
FifoPlayer::GetInstance().SetFrameWrittenCallback(NULL);
|
||||
FifoPlayer::GetInstance().SetFrameWrittenCallback(nullptr);
|
||||
|
||||
sMutex.lock();
|
||||
m_EvtHandler = NULL;
|
||||
m_EvtHandler = nullptr;
|
||||
sMutex.unlock();
|
||||
}
|
||||
|
||||
|
@ -978,7 +978,7 @@ wxString FifoPlayerDlg::CreateIntegerLabel(size_t size, const wxString& label) c
|
|||
|
||||
bool FifoPlayerDlg::GetSaveButtonEnabled() const
|
||||
{
|
||||
return (FifoRecorder::GetInstance().GetRecordedFile() != NULL);
|
||||
return (FifoRecorder::GetInstance().GetRecordedFile() != nullptr);
|
||||
}
|
||||
|
||||
void FifoPlayerDlg::RecordingFinished()
|
||||
|
|
|
@ -139,7 +139,7 @@ CRenderFrame::CRenderFrame(wxFrame* parent, wxWindowID id, const wxString& title
|
|||
SetIcon(IconTemp);
|
||||
|
||||
DragAcceptFiles(true);
|
||||
Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CRenderFrame::OnDropFiles), NULL, this);
|
||||
Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CRenderFrame::OnDropFiles), nullptr, this);
|
||||
}
|
||||
|
||||
void CRenderFrame::OnDropFiles(wxDropFilesEvent& event)
|
||||
|
@ -298,12 +298,12 @@ CFrame::CFrame(wxFrame* parent,
|
|||
bool ShowLogWindow,
|
||||
long style)
|
||||
: CRenderFrame(parent, id, title, pos, size, style)
|
||||
, g_pCodeWindow(NULL), g_NetPlaySetupDiag(NULL), g_CheatsWindow(NULL)
|
||||
, m_ToolBar(NULL), m_ToolBarDebug(NULL), m_ToolBarAui(NULL)
|
||||
, m_GameListCtrl(NULL), m_Panel(NULL)
|
||||
, m_RenderFrame(NULL), m_RenderParent(NULL)
|
||||
, m_LogWindow(NULL), m_LogConfigWindow(NULL)
|
||||
, m_FifoPlayerDlg(NULL), UseDebugger(_UseDebugger)
|
||||
, g_pCodeWindow(nullptr), g_NetPlaySetupDiag(nullptr), g_CheatsWindow(nullptr)
|
||||
, m_ToolBar(nullptr), m_ToolBarDebug(nullptr), m_ToolBarAui(nullptr)
|
||||
, m_GameListCtrl(nullptr), m_Panel(nullptr)
|
||||
, m_RenderFrame(nullptr), m_RenderParent(nullptr)
|
||||
, m_LogWindow(nullptr), m_LogConfigWindow(nullptr)
|
||||
, m_FifoPlayerDlg(nullptr), UseDebugger(_UseDebugger)
|
||||
, m_bBatchMode(_BatchMode), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false)
|
||||
, m_bGameLoading(false)
|
||||
{
|
||||
|
@ -442,7 +442,7 @@ bool CFrame::RendererIsFullscreen()
|
|||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
if (m_RenderFrame != NULL)
|
||||
if (m_RenderFrame != nullptr)
|
||||
{
|
||||
NSView *view = (NSView *) m_RenderFrame->GetHandle();
|
||||
NSWindow *window = [view window];
|
||||
|
@ -512,7 +512,7 @@ void CFrame::OnClose(wxCloseEvent& event)
|
|||
{
|
||||
// Close the log window now so that its settings are saved
|
||||
m_LogWindow->Close();
|
||||
m_LogWindow = NULL;
|
||||
m_LogWindow = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -608,12 +608,12 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
|||
break;
|
||||
|
||||
case IDM_UPDATESTATUSBAR:
|
||||
if (GetStatusBar() != NULL)
|
||||
if (GetStatusBar() != nullptr)
|
||||
GetStatusBar()->SetStatusText(event.GetString(), event.GetInt());
|
||||
break;
|
||||
|
||||
case IDM_UPDATETITLE:
|
||||
if (m_RenderFrame != NULL)
|
||||
if (m_RenderFrame != nullptr)
|
||||
m_RenderFrame->SetTitle(event.GetString());
|
||||
break;
|
||||
|
||||
|
@ -700,13 +700,13 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height)
|
|||
|
||||
bool CFrame::RendererHasFocus()
|
||||
{
|
||||
if (m_RenderParent == NULL)
|
||||
if (m_RenderParent == nullptr)
|
||||
return false;
|
||||
#ifdef _WIN32
|
||||
if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
|
||||
return true;
|
||||
#else
|
||||
if (wxWindow::FindFocus() == NULL)
|
||||
if (wxWindow::FindFocus() == nullptr)
|
||||
return false;
|
||||
// Why these different cases?
|
||||
if (m_RenderParent == wxWindow::FindFocus() ||
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
bool RendererHasFocus();
|
||||
void DoFullscreen(bool bF);
|
||||
void ToggleDisplayMode (bool bFullscreen);
|
||||
void UpdateWiiMenuChoice(wxMenuItem *WiiMenuItem=NULL);
|
||||
void UpdateWiiMenuChoice(wxMenuItem *WiiMenuItem=nullptr);
|
||||
static void ConnectWiimote(int wm_idx, bool connect);
|
||||
|
||||
const CGameListCtrl *GetGameListCtrl() const;
|
||||
|
@ -244,7 +244,7 @@ private:
|
|||
void DoFloatNotebookPage(wxWindowID Id);
|
||||
wxFrame * CreateParentFrame(wxWindowID Id = wxID_ANY,
|
||||
const wxString& title = wxT(""),
|
||||
wxWindow * = NULL);
|
||||
wxWindow * = nullptr);
|
||||
wxString AuiFullscreen, AuiCurrent;
|
||||
void AddPane();
|
||||
void UpdateCurrentPerspective();
|
||||
|
|
|
@ -151,7 +151,7 @@ void CFrame::ToggleLogConfigWindow(bool bShow)
|
|||
else
|
||||
{
|
||||
DoRemovePage(m_LogConfigWindow, false);
|
||||
m_LogConfigWindow = NULL;
|
||||
m_LogConfigWindow = nullptr;
|
||||
}
|
||||
|
||||
// Hide or Show the pane
|
||||
|
@ -388,7 +388,7 @@ void CFrame::ShowResizePane()
|
|||
void CFrame::TogglePane()
|
||||
{
|
||||
// Get the first notebook
|
||||
wxAuiNotebook * NB = NULL;
|
||||
wxAuiNotebook * NB = nullptr;
|
||||
for (u32 i = 0; i < m_Mgr->GetAllPanes().GetCount(); i++)
|
||||
{
|
||||
if (m_Mgr->GetAllPanes()[i].window->IsKindOf(CLASSINFO(wxAuiNotebook)))
|
||||
|
@ -983,7 +983,7 @@ wxWindow * CFrame::GetNotebookPageFromId(wxWindowID Id)
|
|||
return NB->GetPage(j);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
wxFrame* CFrame::CreateParentFrame(wxWindowID Id, const wxString& Title, wxWindow* Child)
|
||||
|
@ -1088,5 +1088,5 @@ wxAuiNotebook * CFrame::GetNotebookFromId(u32 NBId)
|
|||
return (wxAuiNotebook*)m_Mgr->GetAllPanes()[i].window;
|
||||
j++;
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -584,7 +584,7 @@ void CFrame::InitBitmaps()
|
|||
m_Bitmaps[Toolbar_FullScreen].LoadFile(dir + "fullscreen.png", wxBITMAP_TYPE_PNG);
|
||||
|
||||
// Update in case the bitmap has been updated
|
||||
if (m_ToolBar != NULL)
|
||||
if (m_ToolBar != nullptr)
|
||||
RecreateToolbar();
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ void CFrame::BootGame(const std::string& filename)
|
|||
// If all that fails, ask to add a dir and don't boot
|
||||
if (bootfile.empty())
|
||||
{
|
||||
if (m_GameListCtrl->GetSelectedISO() != NULL)
|
||||
if (m_GameListCtrl->GetSelectedISO() != nullptr)
|
||||
{
|
||||
if (m_GameListCtrl->GetSelectedISO()->IsValid())
|
||||
bootfile = m_GameListCtrl->GetSelectedISO()->GetFileName();
|
||||
|
@ -872,7 +872,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
|||
else
|
||||
{
|
||||
// Change to default resolution
|
||||
ChangeDisplaySettings(NULL, CDS_FULLSCREEN);
|
||||
ChangeDisplaySettings(nullptr, CDS_FULLSCREEN);
|
||||
}
|
||||
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
|
||||
|
@ -967,7 +967,7 @@ void CFrame::StartGame(const std::string& filename)
|
|||
// Destroy the renderer frame when not rendering to main
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
m_RenderFrame->Destroy();
|
||||
m_RenderParent = NULL;
|
||||
m_RenderParent = nullptr;
|
||||
m_bGameLoading = false;
|
||||
UpdateGUI();
|
||||
}
|
||||
|
@ -1060,7 +1060,7 @@ void CFrame::DoStop()
|
|||
|
||||
m_bGameLoading = false;
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED ||
|
||||
m_RenderParent != NULL)
|
||||
m_RenderParent != nullptr)
|
||||
{
|
||||
#if defined __WXGTK__
|
||||
wxMutexGuiLeave();
|
||||
|
@ -1140,7 +1140,7 @@ void CFrame::DoStop()
|
|||
// Make sure the window is not longer set to stay on top
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
|
||||
}
|
||||
m_RenderParent = NULL;
|
||||
m_RenderParent = nullptr;
|
||||
|
||||
// Clean framerate indications from the status bar.
|
||||
GetStatusBar()->SetStatusText(wxT(" "), 0);
|
||||
|
@ -1339,7 +1339,7 @@ void CFrame::OnNetPlay(wxCommandEvent& WXUNUSED (event))
|
|||
{
|
||||
if (!g_NetPlaySetupDiag)
|
||||
{
|
||||
if (NetPlayDiag::GetInstance() != NULL)
|
||||
if (NetPlayDiag::GetInstance() != nullptr)
|
||||
NetPlayDiag::GetInstance()->Raise();
|
||||
else
|
||||
g_NetPlaySetupDiag = new NetPlaySetupDiag(this, m_GameListCtrl);
|
||||
|
@ -1736,7 +1736,7 @@ void CFrame::UpdateGUI()
|
|||
m_GameListCtrl->Show();
|
||||
}
|
||||
// Game has been selected but not started, enable play button
|
||||
if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled())
|
||||
if (m_GameListCtrl->GetSelectedISO() != nullptr && m_GameListCtrl->IsEnabled())
|
||||
{
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
|
|
|
@ -31,7 +31,7 @@ void cInterfaceEGL::DetectMode()
|
|||
return;
|
||||
|
||||
EGLint num_configs;
|
||||
EGLConfig *config = NULL;
|
||||
EGLConfig *config = nullptr;
|
||||
bool supportsGL = false, supportsGLES2 = false, supportsGLES3 = false;
|
||||
|
||||
// attributes for a visual in RGBA format with at least
|
||||
|
@ -43,7 +43,7 @@ void cInterfaceEGL::DetectMode()
|
|||
EGL_NONE };
|
||||
|
||||
// Get how many configs there are
|
||||
if (!eglChooseConfig( GLWin.egl_dpy, attribs, NULL, 0, &num_configs))
|
||||
if (!eglChooseConfig( GLWin.egl_dpy, attribs, nullptr, 0, &num_configs))
|
||||
{
|
||||
INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config\n");
|
||||
goto err_exit;
|
||||
|
@ -186,7 +186,7 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
|
||||
GLWin.native_window = Platform.CreateWindow();
|
||||
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, NULL);
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, nullptr);
|
||||
if (!GLWin.egl_surf)
|
||||
{
|
||||
INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
|
||||
|
@ -218,6 +218,6 @@ void cInterfaceEGL::Shutdown()
|
|||
NOTICE_LOG(VIDEO, "Could not destroy window surface.");
|
||||
if(!eglTerminate(GLWin.egl_dpy))
|
||||
NOTICE_LOG(VIDEO, "Could not destroy display connection.");
|
||||
GLWin.egl_ctx = NULL;
|
||||
GLWin.egl_ctx = nullptr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
typedef int ( * PFNGLXSWAPINTERVALSGIPROC) (int interval);
|
||||
PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;
|
||||
PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;
|
||||
|
||||
// Show the current FPS
|
||||
void cInterfaceGLX::UpdateFPSDisplay(const char *text)
|
||||
|
@ -71,8 +71,8 @@ bool cInterfaceGLX::Create(void *&window_handle)
|
|||
GLX_DOUBLEBUFFER,
|
||||
None };
|
||||
|
||||
GLWin.dpy = XOpenDisplay(0);
|
||||
GLWin.evdpy = XOpenDisplay(0);
|
||||
GLWin.dpy = XOpenDisplay(nullptr);
|
||||
GLWin.evdpy = XOpenDisplay(nullptr);
|
||||
GLWin.parent = (Window)window_handle;
|
||||
GLWin.screen = DefaultScreen(GLWin.dpy);
|
||||
if (GLWin.parent == 0)
|
||||
|
@ -83,17 +83,17 @@ bool cInterfaceGLX::Create(void *&window_handle)
|
|||
|
||||
// Get an appropriate visual
|
||||
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListDbl);
|
||||
if (GLWin.vi == NULL)
|
||||
if (GLWin.vi == nullptr)
|
||||
{
|
||||
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListSgl);
|
||||
if (GLWin.vi != NULL)
|
||||
if (GLWin.vi != nullptr)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Only single buffered visual!");
|
||||
}
|
||||
else
|
||||
{
|
||||
GLWin.vi = glXChooseVisual(GLWin.dpy, GLWin.screen, attrListDefault);
|
||||
if (GLWin.vi == NULL)
|
||||
if (GLWin.vi == nullptr)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Could not choose visual (glXChooseVisual)");
|
||||
return false;
|
||||
|
@ -104,7 +104,7 @@ bool cInterfaceGLX::Create(void *&window_handle)
|
|||
NOTICE_LOG(VIDEO, "Got double buffered visual!");
|
||||
|
||||
// Create a GLX context.
|
||||
GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, 0, GL_TRUE);
|
||||
GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, nullptr, GL_TRUE);
|
||||
if (!GLWin.ctx)
|
||||
{
|
||||
PanicAlert("Unable to create GLX context.");
|
||||
|
@ -142,7 +142,7 @@ bool cInterfaceGLX::MakeCurrent()
|
|||
|
||||
bool cInterfaceGLX::ClearCurrent()
|
||||
{
|
||||
return glXMakeCurrent(GLWin.dpy, None, NULL);
|
||||
return glXMakeCurrent(GLWin.dpy, None, nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,7 +155,7 @@ void cInterfaceGLX::Shutdown()
|
|||
glXDestroyContext(GLWin.dpy, GLWin.ctx);
|
||||
XCloseDisplay(GLWin.dpy);
|
||||
XCloseDisplay(GLWin.evdpy);
|
||||
GLWin.ctx = NULL;
|
||||
GLWin.ctx = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
virtual void UpdateFPSDisplay(const char *Text) {}
|
||||
virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; }
|
||||
virtual u32 GetMode() { return s_opengl_mode; }
|
||||
virtual void* GetFuncAddress(std::string name) { return NULL; }
|
||||
virtual void* GetFuncAddress(std::string name) { return nullptr; }
|
||||
virtual bool Create(void *&window_handle) { return true; }
|
||||
virtual bool MakeCurrent() { return true; }
|
||||
virtual bool ClearCurrent() { return true; }
|
||||
|
|
|
@ -62,7 +62,7 @@ bool cPlatform::SelectDisplay(void)
|
|||
#endif
|
||||
platform_env);
|
||||
free(platform_env);
|
||||
platform_env = NULL;
|
||||
platform_env = nullptr;
|
||||
}
|
||||
#if HAVE_WAYLAND
|
||||
if (wayland_possible)
|
||||
|
@ -154,7 +154,7 @@ EGLDisplay cPlatform::EGLGetDisplay(void)
|
|||
#ifdef ANDROID
|
||||
return eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
#endif
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EGLNativeWindowType cPlatform::CreateWindow(void)
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
#include "VideoCommon/VertexShaderManager.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
static HDC hDC = NULL; // Private GDI Device Context
|
||||
static HGLRC hRC = NULL; // Permanent Rendering Context
|
||||
static HINSTANCE dllHandle = NULL; // Handle to OpenGL32.dll
|
||||
static HDC hDC = nullptr; // Private GDI Device Context
|
||||
static HGLRC hRC = nullptr; // Permanent Rendering Context
|
||||
static HINSTANCE dllHandle = nullptr; // Handle to OpenGL32.dll
|
||||
|
||||
// typedef from wglext.h
|
||||
typedef BOOL(WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;
|
||||
static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr;
|
||||
|
||||
void cInterfaceWGL::SwapInterval(int Interval)
|
||||
{
|
||||
|
@ -34,9 +34,9 @@ void cInterfaceWGL::Swap()
|
|||
void* cInterfaceWGL::GetFuncAddress(std::string name)
|
||||
{
|
||||
void* func = (void*)wglGetProcAddress((LPCSTR)name.c_str());
|
||||
if (func == NULL)
|
||||
if (func == nullptr)
|
||||
func = (void*)GetProcAddress(dllHandle, (LPCSTR)name.c_str());
|
||||
return func;
|
||||
return func;
|
||||
}
|
||||
|
||||
// Draw messages on top of the screen
|
||||
|
@ -78,7 +78,7 @@ bool cInterfaceWGL::Create(void *&window_handle)
|
|||
#endif
|
||||
|
||||
window_handle = (void*)EmuWindow::Create((HWND)window_handle, GetModuleHandle(0), _T("Please wait..."));
|
||||
if (window_handle == NULL)
|
||||
if (window_handle == nullptr)
|
||||
{
|
||||
Host_SysMessage("failed to create window");
|
||||
return false;
|
||||
|
@ -138,7 +138,7 @@ bool cInterfaceWGL::MakeCurrent()
|
|||
|
||||
bool cInterfaceWGL::ClearCurrent()
|
||||
{
|
||||
bool success = wglMakeCurrent(hDC, NULL) ? true : false;
|
||||
bool success = wglMakeCurrent(hDC, nullptr) ? true : false;
|
||||
if (success)
|
||||
{
|
||||
// Grab the swap interval function pointer
|
||||
|
@ -183,19 +183,19 @@ void cInterfaceWGL::Shutdown()
|
|||
{
|
||||
if (hRC)
|
||||
{
|
||||
if (!wglMakeCurrent(NULL, NULL))
|
||||
if (!wglMakeCurrent(nullptr, nullptr))
|
||||
NOTICE_LOG(VIDEO, "Could not release drawing context.");
|
||||
|
||||
if (!wglDeleteContext(hRC))
|
||||
ERROR_LOG(VIDEO, "Attempt to release rendering context failed.");
|
||||
|
||||
hRC = NULL;
|
||||
hRC = nullptr;
|
||||
}
|
||||
|
||||
if (hDC && !ReleaseDC(EmuWindow::GetWnd(), hDC))
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Attempt to release device context failed.");
|
||||
hDC = NULL;
|
||||
hDC = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ hide_cursor(void)
|
|||
return;
|
||||
|
||||
wl_pointer_set_cursor(GLWin.pointer.wl_pointer,
|
||||
GLWin.pointer.serial, NULL, 0, 0);
|
||||
GLWin.pointer.serial, nullptr, 0, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -104,10 +104,10 @@ toggle_fullscreen(bool fullscreen)
|
|||
if (fullscreen) {
|
||||
wl_shell_surface_set_fullscreen(GLWin.wl_shell_surface,
|
||||
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
|
||||
0, NULL);
|
||||
0, nullptr);
|
||||
} else {
|
||||
wl_shell_surface_set_toplevel(GLWin.wl_shell_surface);
|
||||
handle_configure(NULL, GLWin.wl_shell_surface, 0,
|
||||
handle_configure(nullptr, GLWin.wl_shell_surface, 0,
|
||||
GLWin.window_size.width,
|
||||
GLWin.window_size.height);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
|
|||
return;
|
||||
}
|
||||
|
||||
map_str = (char *) mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
map_str = (char *) mmap(nullptr, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (map_str == MAP_FAILED) {
|
||||
close(fd);
|
||||
return;
|
||||
|
@ -146,7 +146,7 @@ keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard,
|
|||
if (!GLWin.keyboard.xkb.state) {
|
||||
fprintf(stderr, "failed to create XKB state\n");
|
||||
xkb_map_unref(GLWin.keyboard.xkb.keymap);
|
||||
GLWin.keyboard.xkb.keymap = NULL;
|
||||
GLWin.keyboard.xkb.keymap = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -244,15 +244,15 @@ static void
|
|||
seat_handle_capabilities(void *data, struct wl_seat *seat,
|
||||
uint32_t caps)
|
||||
{
|
||||
struct wl_pointer *wl_pointer = NULL;
|
||||
struct wl_keyboard *wl_keyboard = NULL;
|
||||
struct wl_pointer *wl_pointer = nullptr;
|
||||
struct wl_keyboard *wl_keyboard = nullptr;
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wl_pointer) {
|
||||
wl_pointer = wl_seat_get_pointer(seat);
|
||||
wl_pointer_add_listener(wl_pointer, &pointer_listener, 0);
|
||||
} else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wl_pointer) {
|
||||
wl_pointer_destroy(wl_pointer);
|
||||
wl_pointer = NULL;
|
||||
wl_pointer = nullptr;
|
||||
}
|
||||
|
||||
GLWin.pointer.wl_pointer = wl_pointer;
|
||||
|
@ -262,7 +262,7 @@ seat_handle_capabilities(void *data, struct wl_seat *seat,
|
|||
wl_keyboard_add_listener(wl_keyboard, &keyboard_listener, 0);
|
||||
} else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && wl_keyboard) {
|
||||
wl_keyboard_destroy(wl_keyboard);
|
||||
wl_keyboard = NULL;
|
||||
wl_keyboard = nullptr;
|
||||
}
|
||||
|
||||
GLWin.keyboard.wl_keyboard = wl_keyboard;
|
||||
|
@ -290,7 +290,7 @@ registry_handle_global(void *data, struct wl_registry *registry,
|
|||
} else if (strcmp(interface, "wl_shm") == 0) {
|
||||
GLWin.wl_shm = (wl_shm *) wl_registry_bind(registry, name,
|
||||
&wl_shm_interface, 1);
|
||||
GLWin.wl_cursor_theme = (wl_cursor_theme *) wl_cursor_theme_load(NULL, 32, GLWin.wl_shm);
|
||||
GLWin.wl_cursor_theme = (wl_cursor_theme *) wl_cursor_theme_load(nullptr, 32, GLWin.wl_shm);
|
||||
GLWin.wl_cursor = (wl_cursor *)
|
||||
wl_cursor_theme_get_cursor(GLWin.wl_cursor_theme, "left_ptr");
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ static const struct wl_registry_listener registry_listener = {
|
|||
|
||||
bool cWaylandInterface::ServerConnect(void)
|
||||
{
|
||||
GLWin.wl_display = wl_display_connect(NULL);
|
||||
GLWin.wl_display = wl_display_connect(nullptr);
|
||||
|
||||
if (!GLWin.wl_display)
|
||||
return false;
|
||||
|
@ -324,18 +324,18 @@ bool cWaylandInterface::Initialize(void *config)
|
|||
return false;
|
||||
}
|
||||
|
||||
GLWin.pointer.wl_pointer = NULL;
|
||||
GLWin.keyboard.wl_keyboard = NULL;
|
||||
GLWin.pointer.wl_pointer = nullptr;
|
||||
GLWin.keyboard.wl_keyboard = nullptr;
|
||||
|
||||
GLWin.keyboard.xkb.context = xkb_context_new((xkb_context_flags) 0);
|
||||
if (GLWin.keyboard.xkb.context == NULL) {
|
||||
if (GLWin.keyboard.xkb.context == nullptr) {
|
||||
fprintf(stderr, "Failed to create XKB context\n");
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
GLWin.wl_registry = wl_display_get_registry(GLWin.wl_display);
|
||||
wl_registry_add_listener(GLWin.wl_registry,
|
||||
®istry_listener, NULL);
|
||||
®istry_listener, nullptr);
|
||||
|
||||
while (!GLWin.wl_compositor)
|
||||
wl_display_dispatch(GLWin.wl_display);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#if USE_EGL
|
||||
bool cXInterface::ServerConnect(void)
|
||||
{
|
||||
GLWin.dpy = XOpenDisplay(NULL);
|
||||
GLWin.dpy = XOpenDisplay(nullptr);
|
||||
|
||||
if (!GLWin.dpy)
|
||||
return false;
|
||||
|
@ -49,7 +49,7 @@ bool cXInterface::Initialize(void *config, void *window_handle)
|
|||
GLWin.width = _twidth;
|
||||
GLWin.height = _theight;
|
||||
|
||||
GLWin.evdpy = XOpenDisplay(NULL);
|
||||
GLWin.evdpy = XOpenDisplay(nullptr);
|
||||
GLWin.parent = (Window) window_handle;
|
||||
GLWin.screen = DefaultScreen(GLWin.dpy);
|
||||
|
||||
|
@ -86,7 +86,7 @@ void *cXInterface::CreateWindow(void)
|
|||
CWBorderPixel | CWBackPixel | CWColormap | CWEventMask, &GLWin.attr);
|
||||
wmProtocols[0] = XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", True);
|
||||
XSetWMProtocols(GLWin.evdpy, GLWin.win, wmProtocols, 1);
|
||||
XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, NULL, 0, NULL);
|
||||
XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, nullptr, 0, nullptr);
|
||||
XMapRaised(GLWin.evdpy, GLWin.win);
|
||||
XSync(GLWin.evdpy, True);
|
||||
|
||||
|
@ -136,7 +136,7 @@ void cX11Window::CreateXWindow(void)
|
|||
CWBorderPixel | CWBackPixel | CWColormap | CWEventMask, &GLWin.attr);
|
||||
wmProtocols[0] = XInternAtom(GLWin.evdpy, "WM_DELETE_WINDOW", True);
|
||||
XSetWMProtocols(GLWin.evdpy, GLWin.win, wmProtocols, 1);
|
||||
XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, NULL, 0, NULL);
|
||||
XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, nullptr, 0, nullptr);
|
||||
XMapRaised(GLWin.evdpy, GLWin.win);
|
||||
XSync(GLWin.evdpy, True);
|
||||
|
||||
|
|
|
@ -211,10 +211,10 @@ END_EVENT_TABLE()
|
|||
|
||||
CGameListCtrl::CGameListCtrl(wxWindow* parent, const wxWindowID id, const
|
||||
wxPoint& pos, const wxSize& size, long style)
|
||||
: wxListCtrl(parent, id, pos, size, style), toolTip(0)
|
||||
: wxListCtrl(parent, id, pos, size, style), toolTip(nullptr)
|
||||
{
|
||||
DragAcceptFiles(true);
|
||||
Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CGameListCtrl::OnDropFiles), NULL, this);
|
||||
Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CGameListCtrl::OnDropFiles), nullptr, this);
|
||||
}
|
||||
|
||||
CGameListCtrl::~CGameListCtrl()
|
||||
|
@ -292,7 +292,7 @@ void CGameListCtrl::Update()
|
|||
if (m_imageListSmall)
|
||||
{
|
||||
delete m_imageListSmall;
|
||||
m_imageListSmall = NULL;
|
||||
m_imageListSmall = nullptr;
|
||||
}
|
||||
|
||||
Hide();
|
||||
|
@ -381,7 +381,7 @@ void CGameListCtrl::Update()
|
|||
SetItemFont(index, *wxITALIC_FONT);
|
||||
SetColumnWidth(0, wxLIST_AUTOSIZE);
|
||||
}
|
||||
if (GetSelectedISO() == NULL)
|
||||
if (GetSelectedISO() == nullptr)
|
||||
main_frame->UpdateGUI();
|
||||
Show();
|
||||
|
||||
|
@ -549,7 +549,7 @@ void CGameListCtrl::ScanForISOs()
|
|||
for (u32 i = 0; i < rFilenames.size(); i++)
|
||||
{
|
||||
std::string FileName;
|
||||
SplitPath(rFilenames[i], NULL, &FileName, NULL);
|
||||
SplitPath(rFilenames[i], nullptr, &FileName, nullptr);
|
||||
|
||||
// Update with the progress (i) and the message
|
||||
dialog.Update(i, wxString::Format(_("Scanning %s"),
|
||||
|
@ -644,7 +644,7 @@ const GameListItem *CGameListCtrl::GetISO(size_t index) const
|
|||
if (index < m_ISOFiles.size())
|
||||
return m_ISOFiles[index];
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CGameListCtrl *caller;
|
||||
|
@ -914,18 +914,18 @@ const GameListItem * CGameListCtrl::GetSelectedISO()
|
|||
{
|
||||
if (m_ISOFiles.size() == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else if (GetSelectedItemCount() == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
long item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
|
||||
if (item == wxNOT_FOUND)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1111,7 +1111,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
|||
if (!iso->IsCompressed() && _compress)
|
||||
{
|
||||
std::string FileName, FileExt;
|
||||
SplitPath(iso->GetFileName(), NULL, &FileName, &FileExt);
|
||||
SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);
|
||||
m_currentFilename = FileName;
|
||||
FileName.append(".gcz");
|
||||
|
||||
|
@ -1136,7 +1136,7 @@ void CGameListCtrl::CompressSelection(bool _compress)
|
|||
else if (iso->IsCompressed() && !_compress)
|
||||
{
|
||||
std::string FileName, FileExt;
|
||||
SplitPath(iso->GetFileName(), NULL, &FileName, &FileExt);
|
||||
SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);
|
||||
m_currentFilename = FileName;
|
||||
if (iso->GetPlatform() == GameListItem::WII_DISC)
|
||||
FileName.append(".iso");
|
||||
|
|
|
@ -256,7 +256,7 @@ enum
|
|||
DECLARE_EVENT_TABLE_ENTRY(\
|
||||
wxEVT_HOST_COMMAND, id, wxID_ANY, \
|
||||
(wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent(wxCommandEventFunction, &fn), \
|
||||
(wxObject*) NULL \
|
||||
(wxObject*) nullptr \
|
||||
),
|
||||
|
||||
extern const wxEventType wxEVT_HOST_COMMAND;
|
||||
|
|
|
@ -45,7 +45,7 @@ HotkeyConfigDialog::HotkeyConfigDialog(wxWindow *parent, wxWindowID id, const wx
|
|||
m_ButtonMappingTimer = new wxTimer(this, wxID_ANY);
|
||||
g_Pressed = 0;
|
||||
g_Modkey = 0;
|
||||
ClickedButton = NULL;
|
||||
ClickedButton = nullptr;
|
||||
GetButtonWaitingID = 0;
|
||||
GetButtonWaitingTimer = 0;
|
||||
#endif
|
||||
|
@ -69,13 +69,13 @@ void HotkeyConfigDialog::EndGetButtons(void)
|
|||
m_ButtonMappingTimer->Stop();
|
||||
GetButtonWaitingTimer = 0;
|
||||
GetButtonWaitingID = 0;
|
||||
ClickedButton = NULL;
|
||||
ClickedButton = nullptr;
|
||||
SetEscapeId(wxID_ANY);
|
||||
}
|
||||
|
||||
void HotkeyConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
if(ClickedButton != NULL)
|
||||
if(ClickedButton != nullptr)
|
||||
{
|
||||
// Save the key
|
||||
g_Pressed = event.GetKeyCode();
|
||||
|
|
|
@ -57,7 +57,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
|||
{
|
||||
DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(_rFileName);
|
||||
|
||||
if (pVolume != NULL)
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
if (!DiscIO::IsVolumeWadFile(pVolume))
|
||||
m_Platform = DiscIO::IsVolumeWiiDisc(pVolume) ? WII_DISC : GAMECUBE_DISC;
|
||||
|
@ -80,11 +80,11 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
|||
// check if we can get some info from the banner file too
|
||||
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
|
||||
|
||||
if (pFileSystem != NULL || m_Platform == WII_WAD)
|
||||
if (pFileSystem != nullptr || m_Platform == WII_WAD)
|
||||
{
|
||||
DiscIO::IBannerLoader* pBannerLoader = DiscIO::CreateBannerLoader(*pFileSystem, pVolume);
|
||||
|
||||
if (pBannerLoader != NULL)
|
||||
if (pBannerLoader != nullptr)
|
||||
{
|
||||
if (pBannerLoader->IsValid())
|
||||
{
|
||||
|
@ -270,7 +270,7 @@ std::string GameListItem::GetName(int _index) const
|
|||
if (name.empty())
|
||||
{
|
||||
// No usable name, return filename (better than nothing)
|
||||
SplitPath(GetFileName(), NULL, &name, NULL);
|
||||
SplitPath(GetFileName(), nullptr, &name, nullptr);
|
||||
}
|
||||
|
||||
return name;
|
||||
|
@ -281,7 +281,7 @@ const std::string GameListItem::GetWiiFSPath() const
|
|||
DiscIO::IVolume *Iso = DiscIO::CreateVolumeFromFilename(m_FileName);
|
||||
std::string ret;
|
||||
|
||||
if (Iso == NULL)
|
||||
if (Iso == nullptr)
|
||||
return ret;
|
||||
|
||||
if (DiscIO::IsVolumeWiiDisc(Iso) || DiscIO::IsVolumeWadFile(Iso))
|
||||
|
|
|
@ -88,8 +88,8 @@ struct WiiPartition
|
|||
};
|
||||
std::vector<WiiPartition> WiiDisc;
|
||||
|
||||
DiscIO::IVolume *OpenISO = NULL;
|
||||
DiscIO::IFileSystem *pFileSystem = NULL;
|
||||
DiscIO::IVolume *OpenISO = nullptr;
|
||||
DiscIO::IFileSystem *pFileSystem = nullptr;
|
||||
|
||||
std::vector<PatchEngine::Patch> onFrame;
|
||||
std::vector<ActionReplay::ARCode> arCodes;
|
||||
|
@ -135,9 +135,9 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
|||
for (u32 i = 0; i < 0xFFFFFFFF; i++) // yes, technically there can be OVER NINE THOUSAND partitions...
|
||||
{
|
||||
WiiPartition temp;
|
||||
if ((temp.Partition = DiscIO::CreateVolumeFromFilename(fileName, 0, i)) != NULL)
|
||||
if ((temp.Partition = DiscIO::CreateVolumeFromFilename(fileName, 0, i)) != nullptr)
|
||||
{
|
||||
if ((temp.FileSystem = DiscIO::CreateFileSystem(temp.Partition)) != NULL)
|
||||
if ((temp.FileSystem = DiscIO::CreateFileSystem(temp.Partition)) != nullptr)
|
||||
{
|
||||
temp.FileSystem->GetFileList(temp.Files);
|
||||
WiiDisc.push_back(temp);
|
||||
|
@ -611,7 +611,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
// Filesystem tree
|
||||
m_Treectrl = new wxTreeCtrl(m_Filesystem, ID_TREECTRL);
|
||||
m_Treectrl->AssignImageList(m_iconList);
|
||||
RootId = m_Treectrl->AddRoot(_("Disc"), 0, 0, 0);
|
||||
RootId = m_Treectrl->AddRoot(_("Disc"), 0, 0, nullptr);
|
||||
|
||||
wxBoxSizer* sTreePage = new wxBoxSizer(wxVERTICAL);
|
||||
sTreePage->Add(m_Treectrl, 1, wxEXPAND|wxALL, 5);
|
||||
|
@ -748,7 +748,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
|
|||
char exportName[512];
|
||||
u32 index[2] = {0, 0};
|
||||
std::vector<const DiscIO::SFileInfo *> fst;
|
||||
DiscIO::IFileSystem *FS = 0;
|
||||
DiscIO::IFileSystem *FS = nullptr;
|
||||
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
{
|
||||
|
@ -854,9 +854,9 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
|||
{
|
||||
if (DiscIO::IsVolumeWiiDisc(OpenISO))
|
||||
for (u32 i = 0; i < WiiDisc.size(); i++)
|
||||
ExportDir(NULL, WxStrToStr(Path).c_str(), i);
|
||||
ExportDir(nullptr, WxStrToStr(Path).c_str(), i);
|
||||
else
|
||||
ExportDir(NULL, WxStrToStr(Path).c_str());
|
||||
ExportDir(nullptr, WxStrToStr(Path).c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -884,7 +884,7 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
|||
|
||||
void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
|
||||
{
|
||||
DiscIO::IFileSystem *FS = NULL;
|
||||
DiscIO::IFileSystem *FS = nullptr;
|
||||
wxString Path = wxDirSelector(_("Choose the folder to extract to"));
|
||||
|
||||
if (Path.empty())
|
||||
|
@ -1153,10 +1153,10 @@ void CISOProperties::LaunchExternalEditor(const std::string& filename)
|
|||
withApplication: @"TextEdit"];
|
||||
#else
|
||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("ini"));
|
||||
if(filetype == NULL) // 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 == NULL) // MIME type failed, aborting mission
|
||||
if(filetype == nullptr) // MIME type failed, aborting mission
|
||||
{
|
||||
PanicAlertT("Filetype 'ini' is unknown! Will not open!");
|
||||
return;
|
||||
|
@ -1415,7 +1415,7 @@ void CISOProperties::ChangeBannerDetails(int lang)
|
|||
m_Maker->SetValue(maker);//dev too
|
||||
|
||||
std::string filename, extension;
|
||||
SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);
|
||||
SplitPath(OpenGameListItem->GetFileName(), nullptr, &filename, &extension);
|
||||
// Also sets the window's title
|
||||
SetTitle(StrToWxStr(StringFromFormat("%s%s: %s - ", filename.c_str(),
|
||||
extension.c_str(), OpenGameListItem->GetUniqueID().c_str())) + shortName);
|
||||
|
|
|
@ -381,8 +381,8 @@ inline bool IsAlphabetic(wxString &str)
|
|||
|
||||
inline void GetExpressionForControl(wxString &expr,
|
||||
wxString &control_name,
|
||||
DeviceQualifier *control_device = NULL,
|
||||
DeviceQualifier *default_device = NULL)
|
||||
DeviceQualifier *control_device = nullptr,
|
||||
DeviceQualifier *default_device = nullptr)
|
||||
{
|
||||
expr = "";
|
||||
|
||||
|
@ -748,7 +748,7 @@ ControlGroupBox::ControlGroupBox(ControllerEmu::ControlGroup* const group, wxWin
|
|||
: wxBoxSizer(wxVERTICAL)
|
||||
, control_group(group)
|
||||
{
|
||||
static_bitmap = NULL;
|
||||
static_bitmap = nullptr;
|
||||
|
||||
wxFont m_SmallFont(7, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||
for (auto& control : group->controls)
|
||||
|
@ -915,7 +915,7 @@ ControlGroupsSizer::ControlGroupsSizer(ControllerEmu* const controller, wxWindow
|
|||
{
|
||||
size_t col_size = 0;
|
||||
|
||||
wxBoxSizer* stacked_groups = NULL;
|
||||
wxBoxSizer* stacked_groups = nullptr;
|
||||
for (auto& group : controller->groups)
|
||||
{
|
||||
ControlGroupBox* control_group_box = new ControlGroupBox(group.get(), parent, eventsink);
|
||||
|
@ -925,7 +925,7 @@ ControlGroupsSizer::ControlGroupsSizer(ControllerEmu* const controller, wxWindow
|
|||
|
||||
const size_t grp_size = group->controls.size() + group->settings.size();
|
||||
col_size += grp_size;
|
||||
if (col_size > 8 || NULL == stacked_groups)
|
||||
if (col_size > 8 || nullptr == stacked_groups)
|
||||
{
|
||||
if (stacked_groups)
|
||||
Add(stacked_groups, 0, /*wxEXPAND|*/wxBOTTOM|wxRIGHT, 5);
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
class ControlGroupsSizer : public wxBoxSizer
|
||||
{
|
||||
public:
|
||||
ControlGroupsSizer(ControllerEmu* const controller, wxWindow* const parent, GamepadPage* const eventsink, std::vector<ControlGroupBox*>* const groups = NULL);
|
||||
ControlGroupsSizer(ControllerEmu* const controller, wxWindow* const parent, GamepadPage* const eventsink, std::vector<ControlGroupBox*>* const groups = nullptr);
|
||||
};
|
||||
|
||||
class InputConfigDialog;
|
||||
|
|
|
@ -66,7 +66,7 @@ void LogConfigWindow::CreateGUIControls()
|
|||
m_writeConsoleCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteConsoleChecked, this);
|
||||
m_writeWindowCB = new wxCheckBox(this, wxID_ANY, _("Write to Window"));
|
||||
m_writeWindowCB->Bind(wxEVT_COMMAND_CHECKBOX_CLICKED, &LogConfigWindow::OnWriteWindowChecked, this);
|
||||
m_writeDebuggerCB = NULL;
|
||||
m_writeDebuggerCB = nullptr;
|
||||
#ifdef _MSC_VER
|
||||
if (IsDebuggerPresent())
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ CLogWindow::CLogWindow(CFrame *parent, wxWindowID id, const wxPoint& pos,
|
|||
: wxPanel(parent, id, pos, size, style, name)
|
||||
, x(0), y(0), winpos(0)
|
||||
, Parent(parent), m_ignoreLogTimer(false), m_LogAccess(true)
|
||||
, m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)
|
||||
, m_Log(nullptr), m_cmdline(nullptr), m_FontChoice(nullptr)
|
||||
{
|
||||
m_LogManager = LogManager::GetInstance();
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ END_EVENT_TABLE()
|
|||
bool wxMsgAlert(const char*, const char*, bool, int);
|
||||
std::string wxStringTranslator(const char *);
|
||||
|
||||
CFrame* main_frame = NULL;
|
||||
CFrame* main_frame = nullptr;
|
||||
|
||||
#ifdef WIN32
|
||||
//Has no error handling.
|
||||
|
@ -204,7 +204,7 @@ bool DolphinApp::OnInit()
|
|||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0
|
||||
wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -327,11 +327,11 @@ bool DolphinApp::OnInit()
|
|||
if (File::Exists("www.dolphin-emulator.com.txt"))
|
||||
{
|
||||
File::Delete("www.dolphin-emulator.com.txt");
|
||||
MessageBox(NULL,
|
||||
MessageBox(nullptr,
|
||||
L"This version of Dolphin was downloaded from a website stealing money from developers of the emulator. Please "
|
||||
L"download Dolphin from the official website instead: http://dolphin-emu.org/",
|
||||
L"Unofficial version detected", MB_OK | MB_ICONWARNING);
|
||||
ShellExecute(NULL, L"open", L"http://dolphin-emu.org/?ref=badver", NULL, NULL, SW_SHOWDEFAULT);
|
||||
ShellExecute(nullptr, L"open", L"http://dolphin-emu.org/?ref=badver", nullptr, nullptr, SW_SHOWDEFAULT);
|
||||
exit(0);
|
||||
}
|
||||
#endif
|
||||
|
@ -351,7 +351,7 @@ bool DolphinApp::OnInit()
|
|||
y = wxDefaultCoord;
|
||||
#endif
|
||||
|
||||
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY,
|
||||
main_frame = new CFrame((wxFrame*)nullptr, wxID_ANY,
|
||||
StrToWxStr(scm_rev_str),
|
||||
wxPoint(x, y), wxSize(w, h),
|
||||
UseDebugger, BatchMode, UseLogger);
|
||||
|
@ -372,14 +372,14 @@ void DolphinApp::MacOpenFile(const wxString &fileName)
|
|||
FileToLoad = fileName;
|
||||
LoadFile = true;
|
||||
|
||||
if (m_afterinit == NULL)
|
||||
if (m_afterinit == nullptr)
|
||||
main_frame->BootGame(WxStrToStr(FileToLoad));
|
||||
}
|
||||
|
||||
void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||
{
|
||||
delete m_afterinit;
|
||||
m_afterinit = NULL;
|
||||
m_afterinit = nullptr;
|
||||
|
||||
if (!BatchMode)
|
||||
main_frame->UpdateGameList();
|
||||
|
@ -538,7 +538,7 @@ void* Host_GetInstance()
|
|||
#else
|
||||
void* Host_GetInstance()
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void* Host_GetRenderHandle()
|
|||
return surf;
|
||||
}
|
||||
|
||||
void* Host_GetInstance() { return NULL; }
|
||||
void* Host_GetInstance() { return nullptr; }
|
||||
|
||||
void Host_UpdateTitle(const char* title)
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ bool LoadBanner(std::string filename, u32 *Banner)
|
|||
{
|
||||
DiscIO::IVolume* pVolume = DiscIO::CreateVolumeFromFilename(filename);
|
||||
|
||||
if (pVolume != NULL)
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
bool bIsWad = false;
|
||||
if (DiscIO::IsVolumeWadFile(pVolume))
|
||||
|
@ -164,11 +164,11 @@ bool LoadBanner(std::string filename, u32 *Banner)
|
|||
// check if we can get some info from the banner file too
|
||||
DiscIO::IFileSystem* pFileSystem = DiscIO::CreateFileSystem(pVolume);
|
||||
|
||||
if (pFileSystem != NULL || bIsWad)
|
||||
if (pFileSystem != nullptr || bIsWad)
|
||||
{
|
||||
DiscIO::IBannerLoader* pBannerLoader = DiscIO::CreateBannerLoader(*pFileSystem, pVolume);
|
||||
|
||||
if (pBannerLoader != NULL)
|
||||
if (pBannerLoader != nullptr)
|
||||
if (pBannerLoader->IsValid())
|
||||
{
|
||||
m_names = pBannerLoader->GetNames();
|
||||
|
@ -213,7 +213,7 @@ std::string GetName(std::string filename)
|
|||
return m_volume_names[0];
|
||||
// No usable name, return filename (better than nothing)
|
||||
std::string name;
|
||||
SplitPath(filename, NULL, &name, NULL);
|
||||
SplitPath(filename, nullptr, &name, nullptr);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
@ -247,14 +247,14 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onTouchAxisE
|
|||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Button, jint Action)
|
||||
{
|
||||
const char *Device = env->GetStringUTFChars(jDevice, NULL);
|
||||
const char *Device = env->GetStringUTFChars(jDevice, nullptr);
|
||||
std::string strDevice = std::string(Device);
|
||||
ButtonManager::GamepadEvent(strDevice, Button, Action);
|
||||
env->ReleaseStringUTFChars(jDevice, Device);
|
||||
}
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMoveEvent(JNIEnv *env, jobject obj, jstring jDevice, jint Axis, jfloat Value)
|
||||
{
|
||||
const char *Device = env->GetStringUTFChars(jDevice, NULL);
|
||||
const char *Device = env->GetStringUTFChars(jDevice, nullptr);
|
||||
std::string strDevice = std::string(Device);
|
||||
ButtonManager::GamepadAxisEvent(strDevice, Axis, Value);
|
||||
env->ReleaseStringUTFChars(jDevice, Device);
|
||||
|
@ -262,7 +262,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_onGamePadMov
|
|||
|
||||
JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBanner(JNIEnv *env, jobject obj, jstring jFile)
|
||||
{
|
||||
const char *File = env->GetStringUTFChars(jFile, NULL);
|
||||
const char *File = env->GetStringUTFChars(jFile, nullptr);
|
||||
jintArray Banner = env->NewIntArray(DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT);
|
||||
u32 uBanner[DVD_BANNER_WIDTH * DVD_BANNER_HEIGHT];
|
||||
if (LoadBanner(File, uBanner))
|
||||
|
@ -274,7 +274,7 @@ JNIEXPORT jintArray JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetBann
|
|||
}
|
||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetTitle(JNIEnv *env, jobject obj, jstring jFile)
|
||||
{
|
||||
const char *File = env->GetStringUTFChars(jFile, NULL);
|
||||
const char *File = env->GetStringUTFChars(jFile, nullptr);
|
||||
std::string Name = GetName(File);
|
||||
m_names.clear();
|
||||
m_volume_names.clear();
|
||||
|
@ -306,10 +306,10 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_eglBindAPI(J
|
|||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jKey, jstring jValue, jstring jDefault)
|
||||
{
|
||||
IniFile ini;
|
||||
const char *File = env->GetStringUTFChars(jFile, NULL);
|
||||
const char *Key = env->GetStringUTFChars(jKey, NULL);
|
||||
const char *Value = env->GetStringUTFChars(jValue, NULL);
|
||||
const char *Default = env->GetStringUTFChars(jDefault, NULL);
|
||||
const char *File = env->GetStringUTFChars(jFile, nullptr);
|
||||
const char *Key = env->GetStringUTFChars(jKey, nullptr);
|
||||
const char *Value = env->GetStringUTFChars(jValue, nullptr);
|
||||
const char *Default = env->GetStringUTFChars(jDefault, nullptr);
|
||||
|
||||
ini.Load(File::GetUserPath(D_CONFIG_IDX) + std::string(File));
|
||||
std::string value;
|
||||
|
@ -326,10 +326,10 @@ JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetConfig
|
|||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JNIEnv *env, jobject obj, jstring jFile, jstring jKey, jstring jValue, jstring jDefault)
|
||||
{
|
||||
IniFile ini;
|
||||
const char *File = env->GetStringUTFChars(jFile, NULL);
|
||||
const char *Key = env->GetStringUTFChars(jKey, NULL);
|
||||
const char *Value = env->GetStringUTFChars(jValue, NULL);
|
||||
const char *Default = env->GetStringUTFChars(jDefault, NULL);
|
||||
const char *File = env->GetStringUTFChars(jFile, nullptr);
|
||||
const char *Key = env->GetStringUTFChars(jKey, nullptr);
|
||||
const char *Value = env->GetStringUTFChars(jValue, nullptr);
|
||||
const char *Default = env->GetStringUTFChars(jDefault, nullptr);
|
||||
|
||||
ini.Load(File::GetUserPath(D_CONFIG_IDX) + std::string(File));
|
||||
|
||||
|
@ -344,7 +344,7 @@ JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetConfig(JN
|
|||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SetFilename(JNIEnv *env, jobject obj, jstring jFile)
|
||||
{
|
||||
const char *File = env->GetStringUTFChars(jFile, NULL);
|
||||
const char *File = env->GetStringUTFChars(jFile, nullptr);
|
||||
|
||||
g_filename = std::string(File);
|
||||
|
||||
|
|
|
@ -60,10 +60,10 @@ void Host_Message(int Id)
|
|||
|
||||
void* Host_GetRenderHandle()
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void* Host_GetInstance() { return NULL; }
|
||||
void* Host_GetInstance() { return nullptr; }
|
||||
|
||||
void Host_UpdateTitle(const char* title){};
|
||||
|
||||
|
@ -293,10 +293,10 @@ int main(int argc, char* argv[])
|
|||
#endif
|
||||
int ch, help = 0;
|
||||
struct option longopts[] = {
|
||||
{ "exec", no_argument, NULL, 'e' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ "version", no_argument, NULL, 'v' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
{ "exec", no_argument, nullptr, 'e' },
|
||||
{ "help", no_argument, nullptr, 'h' },
|
||||
{ "version", no_argument, nullptr, 'v' },
|
||||
{ nullptr, 0, nullptr, 0 }
|
||||
};
|
||||
|
||||
while ((ch = getopt_long(argc, argv, "eh?v", longopts, 0)) != -1)
|
||||
|
@ -337,7 +337,7 @@ int main(int argc, char* argv[])
|
|||
GLWin.platform = EGL_PLATFORM_NONE;
|
||||
#endif
|
||||
#if HAVE_WAYLAND
|
||||
GLWin.wl_display = NULL;
|
||||
GLWin.wl_display = nullptr;
|
||||
#endif
|
||||
|
||||
// No use running the loop when booting fails
|
||||
|
|
|
@ -113,8 +113,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]=NULL;
|
||||
memoryCard[SLOT_B]=NULL;
|
||||
memoryCard[SLOT_A]=nullptr;
|
||||
memoryCard[SLOT_B]=nullptr;
|
||||
|
||||
mcmSettings.twoCardsLoaded = false;
|
||||
if (!LoadSettings())
|
||||
|
@ -135,12 +135,12 @@ CMemcardManager::~CMemcardManager()
|
|||
if (memoryCard[SLOT_A])
|
||||
{
|
||||
delete memoryCard[SLOT_A];
|
||||
memoryCard[SLOT_A] = NULL;
|
||||
memoryCard[SLOT_A] = nullptr;
|
||||
}
|
||||
if (memoryCard[SLOT_B])
|
||||
{
|
||||
delete memoryCard[SLOT_B];
|
||||
memoryCard[SLOT_B] = NULL;
|
||||
memoryCard[SLOT_B] = nullptr;
|
||||
}
|
||||
SaveSettings();
|
||||
}
|
||||
|
@ -320,7 +320,7 @@ void CMemcardManager::ChangePath(int slot)
|
|||
if (memoryCard[slot])
|
||||
{
|
||||
delete memoryCard[slot];
|
||||
memoryCard[slot] = NULL;
|
||||
memoryCard[slot] = nullptr;
|
||||
}
|
||||
mcmSettings.twoCardsLoaded = false;
|
||||
m_MemcardPath[slot]->SetPath(wxEmptyString);
|
||||
|
@ -598,14 +598,14 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
|||
{
|
||||
std::string path1, path2, mpath;
|
||||
mpath = WxStrToStr(m_MemcardPath[slot]->GetPath());
|
||||
SplitPath(mpath, &path1, &path2, NULL);
|
||||
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()))
|
||||
for (int i = 0; i < DIRLEN; i++)
|
||||
{
|
||||
CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, NULL, path1), -1);
|
||||
CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, nullptr, path1), -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -54,10 +54,10 @@ BEGIN_EVENT_TABLE(NetPlayDiag, wxFrame)
|
|||
EVT_COMMAND(wxID_ANY, wxEVT_THREAD, NetPlayDiag::OnThread)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
static NetPlayServer* netplay_server = NULL;
|
||||
static NetPlayClient* netplay_client = NULL;
|
||||
static NetPlayServer* netplay_server = nullptr;
|
||||
static NetPlayClient* netplay_client = nullptr;
|
||||
extern CFrame* main_frame;
|
||||
NetPlayDiag *NetPlayDiag::npd = NULL;
|
||||
NetPlayDiag *NetPlayDiag::npd = nullptr;
|
||||
|
||||
std::string BuildGameName(const GameListItem& game)
|
||||
{
|
||||
|
@ -227,7 +227,7 @@ NetPlaySetupDiag::~NetPlaySetupDiag()
|
|||
netplay_section.Set("HostPort", WxStrToStr(m_host_port_text->GetValue()));
|
||||
|
||||
inifile.Save(dolphin_ini);
|
||||
main_frame->g_NetPlaySetupDiag = NULL;
|
||||
main_frame->g_NetPlaySetupDiag = nullptr;
|
||||
}
|
||||
|
||||
void NetPlaySetupDiag::MakeNetPlayDiag(int port, const std::string &game, bool is_hosting)
|
||||
|
@ -311,7 +311,7 @@ NetPlayDiag::NetPlayDiag(wxWindow* const parent, const CGameListCtrl* const game
|
|||
const std::string& game, const bool is_hosting)
|
||||
: wxFrame(parent, wxID_ANY, wxT(NETPLAY_TITLEBAR))
|
||||
, m_selected_game(game)
|
||||
, m_start_btn(NULL)
|
||||
, m_start_btn(nullptr)
|
||||
, m_game_list(game_list)
|
||||
{
|
||||
wxPanel* const panel = new wxPanel(this);
|
||||
|
@ -409,14 +409,14 @@ NetPlayDiag::~NetPlayDiag()
|
|||
if (netplay_client)
|
||||
{
|
||||
delete netplay_client;
|
||||
netplay_client = NULL;
|
||||
netplay_client = nullptr;
|
||||
}
|
||||
if (netplay_server)
|
||||
{
|
||||
delete netplay_server;
|
||||
netplay_server = NULL;
|
||||
netplay_server = nullptr;
|
||||
}
|
||||
npd = NULL;
|
||||
npd = nullptr;
|
||||
}
|
||||
|
||||
void NetPlayDiag::OnChat(wxCommandEvent&)
|
||||
|
@ -724,6 +724,6 @@ void PadMapDiag::OnAdjust(wxCommandEvent& event)
|
|||
|
||||
void NetPlay::StopGame()
|
||||
{
|
||||
if (netplay_client != NULL)
|
||||
if (netplay_client != nullptr)
|
||||
netplay_client->Stop();
|
||||
}
|
||||
|
|
|
@ -736,7 +736,7 @@ bool TASInputDlg::TASHasFocus()
|
|||
|
||||
if (wxWindow::FindFocus() == this)
|
||||
return true;
|
||||
else if (wxWindow::FindFocus() != NULL &&
|
||||
else if (wxWindow::FindFocus() != nullptr &&
|
||||
wxWindow::FindFocus()->GetParent() == this)
|
||||
return true;
|
||||
else
|
||||
|
|
|
@ -161,7 +161,7 @@ wxArrayString GetListOfResolutions()
|
|||
dmi.dmSize = sizeof(dmi);
|
||||
std::vector<std::string> resos;
|
||||
|
||||
while (EnumDisplaySettings(NULL, iModeNum++, &dmi) != 0)
|
||||
while (EnumDisplaySettings(nullptr, iModeNum++, &dmi) != 0)
|
||||
{
|
||||
char res[100];
|
||||
sprintf(res, "%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight);
|
||||
|
@ -177,7 +177,7 @@ wxArrayString GetListOfResolutions()
|
|||
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
main_frame->m_XRRConfig->AddResolutions(retlist);
|
||||
#elif defined(__APPLE__)
|
||||
CFArrayRef modes = CGDisplayCopyAllDisplayModes(CGMainDisplayID(), NULL);
|
||||
CFArrayRef modes = CGDisplayCopyAllDisplayModes(CGMainDisplayID(), nullptr);
|
||||
for (CFIndex i = 0; i < CFArrayGetCount(modes); i++)
|
||||
{
|
||||
std::stringstream res;
|
||||
|
|
|
@ -68,7 +68,7 @@ typedef IntegerSetting<u32> U32Setting;
|
|||
class SettingChoice : public wxChoice
|
||||
{
|
||||
public:
|
||||
SettingChoice(wxWindow* parent, int &setting, const wxString& tooltip, int num = 0, const wxString choices[] = NULL, long style = 0);
|
||||
SettingChoice(wxWindow* parent, int &setting, const wxString& tooltip, int num = 0, const wxString choices[] = nullptr, long style = 0);
|
||||
void UpdateValue(wxCommandEvent& ev);
|
||||
private:
|
||||
int &m_setting;
|
||||
|
@ -178,7 +178,7 @@ protected:
|
|||
|
||||
// Creates controls and connects their enter/leave window events to Evt_Enter/LeaveControl
|
||||
SettingCheckBox* CreateCheckBox(wxWindow* parent, const wxString& label, const wxString& description, bool &setting, bool reverse = false, long style = 0);
|
||||
SettingChoice* CreateChoice(wxWindow* parent, int& setting, const wxString& description, int num = 0, const wxString choices[] = NULL, long style = 0);
|
||||
SettingChoice* CreateChoice(wxWindow* parent, int& setting, const wxString& description, int num = 0, const wxString choices[] = nullptr, long style = 0);
|
||||
SettingRadioButton* CreateRadioButton(wxWindow* parent, const wxString& label, const wxString& description, bool &setting, bool reverse = false, long style = 0);
|
||||
|
||||
// Same as above but only connects enter/leave window events
|
||||
|
|
|
@ -100,9 +100,9 @@ void InhibitScreensaver(Display *dpy, Window win, bool suspend)
|
|||
(char *)"xdg-screensaver",
|
||||
(char *)(suspend ? "suspend" : "resume"),
|
||||
id,
|
||||
NULL};
|
||||
nullptr};
|
||||
pid_t pid;
|
||||
if (!posix_spawnp(&pid, "xdg-screensaver", NULL, NULL, argv, environ))
|
||||
if (!posix_spawnp(&pid, "xdg-screensaver", nullptr, nullptr, argv, environ))
|
||||
{
|
||||
int status;
|
||||
while (waitpid (pid, &status, 0) == -1);
|
||||
|
@ -115,7 +115,7 @@ void InhibitScreensaver(Display *dpy, Window win, bool suspend)
|
|||
XRRConfiguration::XRRConfiguration(Display *_dpy, Window _win)
|
||||
: dpy(_dpy)
|
||||
, win(_win)
|
||||
, screenResources(NULL), outputInfo(NULL), crtcInfo(NULL)
|
||||
, screenResources(nullptr), outputInfo(nullptr), crtcInfo(nullptr)
|
||||
, fullMode(0)
|
||||
, fs_fb_width(0), fs_fb_height(0), fs_fb_width_mm(0), fs_fb_height_mm(0)
|
||||
, bValid(true), bIsFullscreen(false)
|
||||
|
@ -165,18 +165,18 @@ void XRRConfiguration::Update()
|
|||
if (outputInfo)
|
||||
{
|
||||
XRRFreeOutputInfo(outputInfo);
|
||||
outputInfo = NULL;
|
||||
outputInfo = nullptr;
|
||||
}
|
||||
if (crtcInfo)
|
||||
{
|
||||
XRRFreeCrtcInfo(crtcInfo);
|
||||
crtcInfo = NULL;
|
||||
crtcInfo = nullptr;
|
||||
}
|
||||
fullMode = 0;
|
||||
|
||||
// Get the resolution setings for fullscreen mode
|
||||
unsigned int fullWidth, fullHeight;
|
||||
char *output_name = NULL;
|
||||
char *output_name = nullptr;
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
|
||||
std::string::npos)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue