m_pButtonClearVertexShaderCache = new wxButton(this, ID_CLEAR_VERTEX_SHADER_CACHE, _("Clear V Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear V Shaders"));
169
169
m_pButtonClearPixelShaderCache = new wxButton(this, ID_CLEAR_PIXEL_SHADER_CACHE, _("Clear P Shaders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator, _("Clear P Shaders"));
- device = ao_open_live(default_driver, &format, NULL /* no options */);+ device = ao_open_live(default_driver, &format, nullptr /* no options */);{PanicAlertT("AudioCommon: Error opening AO device.\n");- device = NULL;+ device = nullptr;+ virtual bool Start() override;+ virtual void SoundLoop() override;+ virtual void Stop() override;static bool isValid() {+ virtual void Update() override;-AlsaSound::AlsaSound(CMixer *mixer) : SoundStream(mixer), thread_data(0), handle(NULL), frames_to_deliver(FRAME_COUNT_MIN)+AlsaSound::AlsaSound(CMixer *mixer) : SoundStream(mixer), thread_data(0), handle(nullptr), frames_to_deliver(FRAME_COUNT_MIN){{- if (handle != NULL)+ if (handle != nullptr){- handle = NULL;+ handle = nullptr;static bool isValid() {+ virtual void Update() override;- if (component == NULL) {+ if (component == nullptr) {- if(*n==0) return NULL;+ if(*n==0) return nullptr;{- filter_coefs_lfe = NULL;+ filter_coefs_lfe = nullptr;{- filter_coefs_lfe = NULL;+ filter_coefs_lfe = nullptr;- HRESULT res = ds->CreateSoundBuffer(&dsbdesc, &dsBuffer, NULL);+ HRESULT res = ds->CreateSoundBuffer(&dsbdesc, &dsBuffer, nullptr);{{PanicAlertT("Sound buffer creation failed: %08x", res);- dsBuffer = NULL;+ dsBuffer = nullptr;- if (dsBuffer != NULL)+ if (dsBuffer != nullptr){- if (dsBuffer != NULL)+ if (dsBuffer != nullptr){{virtual ~NullSound() {}static bool isValid() { return true; }virtual bool usesMixer() const { return true; }+ virtual void Update() override;{{- char *defDevName = pDeviceList->GetDeviceName(pDeviceList->GetDefaultDevice());+ char *defDevName = pDeviceList.GetDeviceName(pDeviceList.GetDefaultDevice());{- ALCcontext *pContext = alcCreateContext(pDevice, NULL);+ ALCcontext *pContext = alcCreateContext(pDevice, nullptr);{{PanicAlertT("OpenAL: can't open device %s", defDevName);{- alcMakeContextCurrent(NULL);+ alcMakeContextCurrent(nullptr);{- OpenALStream(CMixer *mixer, void *hWnd = NULL)+ OpenALStream(CMixer *mixer, void *hWnd = nullptr){}virtual ~OpenALStream() {}static bool isValid() { return true; }virtual bool usesMixer() const { return true; }+ virtual void Update() override;-static SLObjectItf bqPlayerObject = NULL;+static SLObjectItf bqPlayerObject = nullptr;static void bqPlayerCallback(SLAndroidSimpleBufferQueueItf bq, void *context) {- assert(NULL == context);+ assert(nullptr == context);{- result = slCreateEngine(&engineObject, 0, NULL, 0, NULL, NULL);+ result = slCreateEngine(&engineObject, 0, nullptr, 0, nullptr, nullptr);SLDataLocator_OutputMix loc_outmix = {SL_DATALOCATOR_OUTPUTMIX, outputMixObject};- SLDataSink audioSnk = {&loc_outmix, NULL};+ SLDataSink audioSnk = {&loc_outmix, nullptr};const SLInterfaceID ids[2] = {SL_IID_BUFFERQUEUE, SL_IID_VOLUME};- result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, NULL);+ result = (*bqPlayerBufferQueue)->RegisterCallback(bqPlayerBufferQueue, bqPlayerCallback, nullptr);{- if (bqPlayerObject != NULL) {+ if (bqPlayerObject != nullptr) {- if (outputMixObject != NULL) {+ if (outputMixObject != nullptr) {- outputMixObject = NULL;+ outputMixObject = nullptr;- if (engineObject != NULL) {+ if (engineObject != nullptr) {{- OpenSLESStream(CMixer *mixer, void *hWnd = NULL)+ OpenSLESStream(CMixer *mixer, void *hWnd = nullptr){};- OpenSLESStream(CMixer *mixer, void *hWnd = NULL): SoundStream(mixer) {}+ OpenSLESStream(CMixer *mixer, void *hWnd = nullptr): SoundStream(mixer) {}{- m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, NULL);+ m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);- m_pa_error = pa_context_connect(m_pa_ctx, NULL, PA_CONTEXT_NOFLAGS, NULL);+ m_pa_error = pa_context_connect(m_pa_ctx, nullptr, PA_CONTEXT_NOFLAGS, nullptr);- m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, NULL);+ m_pa_error = pa_mainloop_iterate(m_pa_ml, 1, nullptr);{- m_pa_s = pa_stream_new(m_pa_ctx, "Playback", &ss, NULL);+ m_pa_s = pa_stream_new(m_pa_ctx, "Playback", &ss, nullptr);- m_pa_error = pa_stream_connect_playback(m_pa_s, NULL, &m_pa_ba, flags, NULL, NULL);+ m_pa_error = pa_stream_connect_playback(m_pa_s, nullptr, &m_pa_ba, flags, nullptr, nullptr);{{- pa_stream_set_buffer_attr(s, &m_pa_ba, NULL, NULL);+ pa_stream_set_buffer_attr(s, &m_pa_ba, nullptr, nullptr);- m_pa_error = pa_stream_write(s, buffer, length, NULL, 0, PA_SEEK_RELATIVE);+ m_pa_error = pa_stream_write(s, buffer, length, nullptr, 0, PA_SEEK_RELATIVE);static bool isValid() {return true;}virtual bool usesMixer() const {return true;}+ virtual void Update() override;+ virtual void SoundLoop() override;- conv_buffer(NULL)+ conv_buffer(nullptr){- , m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))+ , m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))){- , m_cleanup_com(SUCCEEDED(CoInitializeEx(NULL, COINIT_MULTITHREADED)))+ , m_cleanup_com(SUCCEEDED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))){- //if (LoadOAL10Library(NULL, &ALFunction) == TRUE) {+ //if (LoadOAL10Library(nullptr, &ALFunction) == TRUE) {{{{{- ALCcontext *context = alcCreateContext(device, NULL);+ ALCcontext *context = alcCreateContext(device, nullptr);{- if ((bNewName) && (actualDeviceName != NULL) && (strlen(actualDeviceName) > 0))+ if ((bNewName) && (actualDeviceName != nullptr) && (strlen(actualDeviceName) > 0)){- alcMakeContextCurrent(NULL);+ alcMakeContextCurrent(nullptr);- return NULL;+ return nullptr;{- char *cpu_string = 0;+ char *cpu_string = nullptr;{- char *implementer_string = 0;+ char *implementer_string = nullptr;{- char *part_string = 0;+ char *part_string = nullptr;- while (token != NULL)+ while (token != nullptr){- token = strtok(NULL, " ");+ token = strtok(nullptr, " ");- ARMXCodeBlock() : region(NULL), region_size(0) {}+ ARMXCodeBlock() : region(nullptr), region_size(0) {}virtual ~ARMXCodeBlock() { if (region) FreeCodeSpace(); }{- region = NULL;+ region = nullptr;{- if (GetMemCheck(_rMemoryCheck.StartAddress) == 0)+ if (GetMemCheck(_rMemoryCheck.StartAddress) == nullptr)- return 0;+ return nullptr;{- const DWORD buffsize = GetLogicalDriveStrings(0, NULL);+ const DWORD buffsize = GetLogicalDriveStrings(0, nullptr);{- if( classes_to_match == NULL )+ if( classes_to_match == nullptr )- if( str_bsd_path == NULL )+ if( str_bsd_path == nullptr ){{- if(psz_buf != NULL)+ if(psz_buf != nullptr){{ "/dev/acd%d", 0, 27 },{ "/dev/cd%d", 0, 27 },- { NULL, 0, 0 }+ { nullptr, 0, 0 }{- if (is_cdrom(drive, NULL))+ if (is_cdrom(drive, nullptr)){{- LinkedListItem<T>* prev = 0;+ LinkedListItem<T>* prev = nullptr;{{{- cur->next = 0;+ cur->next = nullptr;{- prev->next = 0;+ prev->next = nullptr;{- list_start = 0;+ list_start = nullptr;{- u8 *ptr = 0;+ u8 *ptr = nullptr;@@ -127,7 +127,7 @@ inline u64 _rotr64(u64 x, unsigned int shift){- else if(new_locale != NULL)+ else if(new_locale != nullptr){{- hConsole = NULL;+ hConsole = nullptr;{- if (hConsole == NULL)+ if (hConsole == nullptr)- hConsole = NULL;+ hConsole = nullptr;- fflush(NULL);+ fflush(nullptr);{- return (hConsole != NULL);+ return (hConsole != nullptr);{- WriteConsole(hConsole, Text, 10, &cCharsWritten, NULL);+ WriteConsole(hConsole, Text, 10, &cCharsWritten, nullptr);- WriteConsole(hConsole, Text, (DWORD)strlen(Text), &cCharsWritten, NULL);+ WriteConsole(hConsole, Text, (DWORD)strlen(Text), &cCharsWritten, nullptr);+ void Log(LogTypes::LOG_LEVELS, const char *Text) override;{- srand((unsigned) (time(NULL)));+ srand((unsigned) (time(nullptr)));{- if ( lpszIniPath != NULL )+ if ( lpszIniPath != nullptr ){TCHAR lpszUnDSymbol[BUFFERSIZE]=_T("?");- LPTSTR lpszParamSep = NULL;+ LPTSTR lpszParamSep = nullptr;- if ( _tcsstr( lpszUnDSymbol, _T("(void)") ) == NULL && _tcsstr( lpszUnDSymbol, _T("()") ) == NULL)+ if ( _tcsstr( lpszUnDSymbol, _T("(void)") ) == nullptr && _tcsstr( lpszUnDSymbol, _T("()") ) == nullptr){{lpszParamSep = _tcschr( lpszParsed, _T(',') );- if ( lpszParamSep == NULL )+ if ( lpszParamSep == nullptr )*lpszParamSep = _T('\0');lpszParamSep = _tcschr( lpszParsed, _T(')') );- if ( lpszParamSep != NULL )+ if ( lpszParamSep != nullptr ){*lpszParamSep = _T('\0');- _tsplitpath(lpszFileName, NULL, NULL, fname, ext);+ _tsplitpath(lpszFileName, nullptr, nullptr, fname, ext);_stprintf( lpszSourceInfo, _T("%s%s(%d)"), fname, ext, lineInfo.LineNumber );- NULL);+ nullptr);- NULL);+ nullptr);- tmpptr->next = NULL;+ tmpptr->next = nullptr;{- ElementPtr() : next(NULL) {}+ ElementPtr() : next(nullptr) {}{{- if (::CreateDirectory(UTF8ToTStr(path).c_str(), NULL))+ if (::CreateDirectory(UTF8ToTStr(path).c_str(), nullptr))- if (ReplaceFile(df.c_str(), sf.c_str(), NULL, REPLACEFILE_IGNORE_MERGE_ERRORS, NULL, NULL))+ if (ReplaceFile(df.c_str(), sf.c_str(), nullptr, REPLACEFILE_IGNORE_MERGE_ERRORS, nullptr, nullptr))- struct dirent dirent, *result = NULL;+ struct dirent dirent, *result = nullptr;{- struct dirent dirent, *result = NULL;+ struct dirent dirent, *result = nullptr;{- struct dirent dirent, *result = NULL;+ struct dirent dirent, *result = nullptr;{- if (!(dir = __getcwd(NULL, 0))) {+ if (!(dir = __getcwd(nullptr, 0))) {- return NULL;+ return nullptr;- if (_tfullpath(absbuf, UTF8ToTStr(path).c_str(), MAX_PATH) != NULL)+ if (_tfullpath(absbuf, UTF8ToTStr(path).c_str(), MAX_PATH) != nullptr)- if (realpath(path.c_str(), absbuf) != NULL)+ if (realpath(path.c_str(), absbuf) != nullptr){- GetModuleFileName(NULL, Dolphin_exe_Path, 2048);+ GetModuleFileName(nullptr, Dolphin_exe_Path, 2048);DolphinPath = DolphinPath.substr(0, DolphinPath.find_last_of('\\'));TCHAR configPath[MAX_PATH] = {0};- if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Dolphin Emulator"), NULL, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS)+ if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Dolphin Emulator"), 0, KEY_QUERY_VALUE, &hkey) == ERROR_SUCCESS){- if (RegQueryValueEx(hkey, TEXT("LocalUserConfig"), NULL, NULL, reinterpret_cast<LPBYTE>(&local), &size) != ERROR_SUCCESS)+ if (RegQueryValueEx(hkey, TEXT("LocalUserConfig"), nullptr, nullptr, reinterpret_cast<LPBYTE>(&local), &size) != ERROR_SUCCESS)- if (RegQueryValueEx(hkey, TEXT("UserConfigPath"), NULL, NULL, (LPBYTE)configPath, &size) != ERROR_SUCCESS)+ if (RegQueryValueEx(hkey, TEXT("UserConfigPath"), nullptr, nullptr, (LPBYTE)configPath, &size) != ERROR_SUCCESS)- bool my_documents_found = SUCCEEDED(SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, my_documents));+ bool my_documents_found = SUCCEEDED(SHGetFolderPath(nullptr, CSIDL_MYDOCUMENTS, nullptr, SHGFP_TYPE_CURRENT, my_documents));- : m_file(NULL), m_good(true)+ : m_file(nullptr), m_good(true){}{}- : m_file(NULL), m_good(true)+ : m_file(nullptr), m_good(true){- : m_file(NULL), m_good(true)+ : m_file(nullptr), m_good(true){- m_file = NULL;+ m_file = nullptr;{- m_file = NULL;+ m_file = nullptr;- bool ReadArray(T* data, size_t length, size_t* pReadBytes = NULL)+ bool ReadArray(T* data, size_t length, size_t* pReadBytes = nullptr){- bool IsOpen() { return NULL != m_file; }+ bool IsOpen() { return nullptr != m_file; }bool IsGood() { return m_good; }- operator void*() { return m_good ? m_file : NULL; }+ operator void*() { return m_good ? m_file : nullptr; }- return 0;+ return nullptr;- return 0;+ return nullptr;- Section* current_section = NULL;+ Section* current_section = nullptr;{- V *value = NULL;+ V *value = nullptr;-LogManager *LogManager::m_logManager = NULL;+LogManager *LogManager::m_logManager = nullptr;{{- m_logManager = NULL;+ m_logManager = nullptr;+ void Log(LogTypes::LOG_LEVELS, const char *msg) override;bool IsValid() { return !m_logfile.fail(); }bool IsEnabled() const { return m_enable; }{+ void Log(LogTypes::LOG_LEVELS, const char *msg) override;{- hMemoryMapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, (DWORD)(size), NULL);+ hMemoryMapping = CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0, (DWORD)(size), nullptr);fd = AshmemCreateFileMapping("Dolphin-emu", size);{- *views[i].out_ptr_low = 0;+ *views[i].out_ptr_low = nullptr;- *views[i].out_ptr = 0;+ *views[i].out_ptr = nullptr;{PanicAlert("MemoryMap_Setup: Failed finding a memory base.");- return 0;+ return nullptr;- u8 *base = NULL;+ u8 *base = nullptr;{{- *outptr = NULL;+ *outptr = nullptr;- static char *map_hint = 0;+ static char *map_hint = nullptr;{- ptr = NULL;+ ptr = nullptr;- if (ptr == NULL)+ if (ptr == nullptr){PanicAlert("Failed to allocate executable memory");- void* ptr = mmap(0, size, PROT_READ | PROT_WRITE,+ void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE,// printf("Mapped memory at %p (size %ld)\n", ptr,- if (ptr == NULL)+ if (ptr == nullptr)PanicAlert("Failed to allocate raw memory");- void* ptr = NULL;+ void* ptr = nullptr;// printf("Mapped memory at %p (size %ld)\n", ptr,- if (ptr == NULL)+ if (ptr == nullptr)PanicAlert("Failed to allocate aligned memory");- if (NULL == hProcess) return "MemUsage Error";+ if (nullptr == hProcess) return "MemUsage Error";Ret = StringFromFormat("%s K", ThousandSeparate(pmc.WorkingSetSize / 1024, 7).c_str());static __declspec(thread) char err_str[buff_size] = {};- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(),+ FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, GetLastError(),- err_str, buff_size, NULL);+ err_str, buff_size, nullptr);static __thread char err_str[buff_size] = {};- m_handle = CreateEvent(NULL, false, false, NULL);+ m_handle = CreateEvent(nullptr, false, false, nullptr);- pthread_cond_init(&m_handle, NULL);+ pthread_cond_init(&m_handle, nullptr);- pthread_mutex_init(&m_handle, NULL);+ pthread_mutex_init(&m_handle, nullptr);- : pm(NULL), owns(false)+ : pm(nullptr), owns(false){}- : pm(NULL), owns(false)+ : pm(nullptr), owns(false){- : pm(NULL), owns(false)+ : pm(nullptr), owns(false){{- pm = NULL;+ pm = nullptr;- pthread_join(m_id.m_thread, NULL);+ pthread_join(m_id.m_thread, nullptr);{- m_handle = (HANDLE)_beginthreadex(NULL, 0, &RunAndDelete<F>, param, 0, &m_id.m_thread);+ m_handle = (HANDLE)_beginthreadex(nullptr, 0, &RunAndDelete<F>, param, 0, &m_id.m_thread);- m_handle = CreateThread(NULL, 0, &RunAndDelete<F>, param, 0, &m_id.m_thread);+ m_handle = CreateThread(nullptr, 0, &RunAndDelete<F>, param, 0, &m_id.m_thread);{- char *endptr = NULL;+ char *endptr = nullptr;- static locale_t c_locale = NULL;+ static locale_t c_locale = nullptr;{- char *buf = NULL;+ char *buf = nullptr;{- char *endptr = NULL;+ char *endptr = nullptr;{- for (XFuncMap::iterator iter = functions.begin(); iter != functions.end(); ++iter)+ for (const auto& func : functions){- (unsigned long)functions.size());+ (unsigned long)functions.size());- return 0;+ return nullptr;SymbolDB() {}virtual ~SymbolDB() {}- virtual Symbol *GetSymbolFromAddr(u32 addr) { return 0; }- virtual Symbol *AddFunction(u32 startAddr) { return 0;}+ virtual Symbol *GetSymbolFromAddr(u32 addr) { return nullptr; }+ virtual Symbol *AddFunction(u32 startAddr) { return nullptr;}- return 0;+ return nullptr;const XFuncMap &Symbols() const {return functions;}- (void)gettimeofday(&t, NULL);+ (void)gettimeofday(&t, nullptr);return StringFromFormat("%s:%03i", tmp, tp.millitm);- (void)gettimeofday(&t, NULL);+ (void)gettimeofday(&t, nullptr);return StringFromFormat("%s:%03d", tmp, (int)(t.tv_usec / 1000));- (void)gettimeofday(&t, NULL);+ (void)gettimeofday(&t, nullptr);inline void Write64(u64 value) {*(u64*)code = (value); code += 8;}- XEmitter() { code = NULL; }+ XEmitter() { code = nullptr; }XEmitter(u8 *code_ptr) { code = code_ptr; }virtual ~XEmitter() {}- XCodeBlock() : region(NULL), region_size(0) {}+ XCodeBlock() : region(nullptr), region_size(0) {}virtual ~XCodeBlock() { if (region) FreeCodeSpace(); }{- region = NULL;+ region = nullptr;-static ARCode const* current_code = NULL;+static ARCode const* current_code = nullptr;- sigaction(SIGSEGV, &sa, NULL);+ sigaction(SIGSEGV, &sa, nullptr);{- bool found = FindMapFile(&strMapFilename, NULL);+ bool found = FindMapFile(&strMapFilename, nullptr);{{- if (pVolume == NULL)+ if (pVolume == nullptr)- // If existing_map_file is not NULL and a map file exists, it is set to the+ // If existing_map_file is not nullptr and a map file exists, it is set to the- // If writable_map_file is not NULL, it is set to the path to where a map+ // If writable_map_file is not nullptr, it is set to the path to where a map- static void UpdateDebugger_MapLoaded(const char* _gameID = NULL);+ static void UpdateDebugger_MapLoaded(const char* _gameID = nullptr);{- sect = NULL;+ sect = nullptr;{- sect = NULL;+ sect = nullptr;- sect = NULL;+ sect = nullptr;- sect = NULL;+ sect = nullptr;- if (pContent == NULL)+ if (pContent == nullptr)- if (pVolume != NULL)+ if (pVolume != nullptr){- return NULL;+ return nullptr;- return NULL;+ return nullptr;{- if (secname != NULL && strcmp(name, secname) == 0)+ if (secname != nullptr && strcmp(name, secname) == 0){- return 0;+ return nullptr;- return 0;+ return nullptr;{{- m_Instance = NULL;+ m_Instance = nullptr;-void *g_pWindowHandle = NULL;+void *g_pWindowHandle = nullptr;-: hInstance(0),+: hInstance(nullptr),- SplitPath(m_strFilename, NULL, NULL, &Extension);+ SplitPath(m_strFilename, nullptr, nullptr, &Extension);{- if (pVolume == NULL)+ if (pVolume == nullptr){PanicAlertT("Could not read \"%s\". "- if (ContentLoader.GetContentByIndex(ContentLoader.GetBootIndex()) == NULL)+ if (ContentLoader.GetContentByIndex(ContentLoader.GetBootIndex()) == nullptr){-Event *eventPool = 0;+Event *eventPool = nullptr;-void (*advanceCallback)(int cyclesExecuted) = NULL;+void (*advanceCallback)(int cyclesExecuted) = nullptr;{{- Event* prev = NULL;+ Event* prev = nullptr;{- gdg_buffer(NULL),+ gdg_buffer(nullptr),if(gdg_buffer) {- gdg_buffer = NULL;+ gdg_buffer = nullptr;- return NULL;+ return nullptr;- while ((pbuf = FindBrackets(s_buffer, d_buffer)) != NULL)+ while ((pbuf = FindBrackets(s_buffer, d_buffer)) != nullptr){- while ((pbuf = strstr(d_buffer, "+")) != NULL)+ while ((pbuf = strstr(d_buffer, "+")) != nullptr){- while ((pbuf = strstr(d_buffer, "-")) != NULL)+ while ((pbuf = strstr(d_buffer, "-")) != nullptr){- while ((pbuf = strstr(d_buffer, "*")) != NULL)+ while ((pbuf = strstr(d_buffer, "*")) != nullptr){- while ((pbuf = strstr(d_buffer, "/")) != NULL)+ while ((pbuf = strstr(d_buffer, "/")) != nullptr){- while ((pbuf = strstr(d_buffer, "|")) != NULL)+ while ((pbuf = strstr(d_buffer, "|")) != nullptr){- while ((pbuf = strstr(d_buffer, "&")) != NULL)+ while ((pbuf = strstr(d_buffer, "&")) != nullptr){{- if (tmpstr == NULL)+ if (tmpstr == nullptr)- tmpstr = strtok(NULL, ",\x00");+ tmpstr = strtok(nullptr, ",\x00");- return NULL;+ return nullptr;//printf("A: %s\n", line);- param_t params[10] = {{0, P_NONE, NULL}};- param_t params_ext[10] = {{0, P_NONE, NULL}};+ param_t params[10] = {{0, P_NONE, nullptr}};+ param_t params_ext[10] = {{0, P_NONE, nullptr}};- char *opcode = NULL;+ char *opcode = nullptr;- char *opcode_ext = NULL;+ char *opcode_ext = nullptr;{- if ((opcode_ext = strstr(opcode, "'")) != NULL)+ if ((opcode_ext = strstr(opcode, "'")) != nullptr){- opcode_ext = NULL;+ opcode_ext = nullptr;{- if ((paramstr_ext = strstr(paramstr, ":")) != NULL)+ if ((paramstr_ext = strstr(paramstr, ":")) != nullptr){{- opcode = NULL;+ opcode = nullptr;- if (opcode == NULL)+ if (opcode == nullptr)- const opc_t *opc_ext = NULL;+ const opc_t *opc_ext = nullptr;{- bool Assemble(const char *text, std::vector<u16> &code, std::vector<int> *line_numbers = NULL);+ bool Assemble(const char *text, std::vector<u16> &code, std::vector<int> *line_numbers = nullptr);std::string GetErrorString() const { return last_error_str; }err_t GetError() const { return last_error; }header.append("#define NUM_UCODES 1\n\n");- SplitPath(_filename, NULL, &filename, NULL);+ SplitPath(_filename, nullptr, &filename, nullptr);header.append(StringFromFormat("const char* UCODE_NAMES[NUM_UCODES] = {\"%s\"};\n\n", filename.c_str()));header.append("const unsigned short dsp_code[NUM_UCODES][0x1000] = {\n");{- if (! SplitPath(filenames->at(i), NULL, &filename, NULL))+ if (! SplitPath(filenames->at(i), nullptr, &filename, nullptr))header.append(StringFromFormat("\t\"%s\",\n", filename.c_str()));-DSPEmitter *dspjit = NULL;+DSPEmitter *dspjit = nullptr;- g_dsp.irom = g_dsp.iram = g_dsp.dram = g_dsp.coef = NULL;+ g_dsp.irom = g_dsp.iram = g_dsp.dram = g_dsp.coef = nullptr;- dspjit = NULL;+ dspjit = nullptr;if(dspjit) {- dspjit = NULL;+ dspjit = nullptr;- const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};+ const DSPOPCTemplate fake_op = {"CW", 0x0000, 0x0000, nop, nullptr, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};{- m_compiledCode = NULL;+ m_compiledCode = nullptr;{- blockLinks[i] = 0;+ blockLinks[i] = nullptr;{- blockLinks[i] = 0;+ blockLinks[i] = nullptr;{- blockLinks[i] = 0;+ blockLinks[i] = nullptr;{- blockLinks[i] = 0;+ blockLinks[i] = nullptr;- {"CW", 0x0000, 0x0000, nop, NULL, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};+ {"CW", 0x0000, 0x0000, nop, nullptr, 1, 1, {{P_VAL, 2, 0, 0, 0xffff}}, false, false, false, false, false};{0xffae, "COEF_A1_7", "COEF_A1_7",},{0xffaf, "COEF_A2_7", "COEF_A2_7",},- {0xffb0, "0xffb0", 0,},- {0xffb1, "0xffb1", 0,},- {0xffb2, "0xffb2", 0,},- {0xffb3, "0xffb3", 0,},- {0xffb4, "0xffb4", 0,},- {0xffb5, "0xffb5", 0,},- {0xffb6, "0xffb6", 0,},- {0xffb7, "0xffb7", 0,},- {0xffb8, "0xffb8", 0,},- {0xffb9, "0xffb9", 0,},- {0xffba, "0xffba", 0,},- {0xffbb, "0xffbb", 0,},- {0xffbc, "0xffbc", 0,},- {0xffbd, "0xffbd", 0,},- {0xffbe, "0xffbe", 0,},- {0xffbf, "0xffbf", 0,},- {0xffc0, "0xffc0", 0,},- {0xffc1, "0xffc1", 0,},- {0xffc2, "0xffc2", 0,},- {0xffc3, "0xffc3", 0,},- {0xffc4, "0xffc4", 0,},- {0xffc5, "0xffc5", 0,},- {0xffc6, "0xffc6", 0,},- {0xffc7, "0xffc7", 0,},- {0xffc8, "0xffc8", 0,},+ {0xffb0, "0xffb0", nullptr,},+ {0xffb1, "0xffb1", nullptr,},+ {0xffb2, "0xffb2", nullptr,},+ {0xffb3, "0xffb3", nullptr,},+ {0xffb4, "0xffb4", nullptr,},+ {0xffb5, "0xffb5", nullptr,},+ {0xffb6, "0xffb6", nullptr,},+ {0xffb7, "0xffb7", nullptr,},+ {0xffb8, "0xffb8", nullptr,},+ {0xffb9, "0xffb9", nullptr,},+ {0xffba, "0xffba", nullptr,},+ {0xffbb, "0xffbb", nullptr,},+ {0xffbc, "0xffbc", nullptr,},+ {0xffbd, "0xffbd", nullptr,},+ {0xffbe, "0xffbe", nullptr,},+ {0xffbf, "0xffbf", nullptr,},+ {0xffc0, "0xffc0", nullptr,},+ {0xffc1, "0xffc1", nullptr,},+ {0xffc2, "0xffc2", nullptr,},+ {0xffc3, "0xffc3", nullptr,},+ {0xffc4, "0xffc4", nullptr,},+ {0xffc5, "0xffc5", nullptr,},+ {0xffc6, "0xffc6", nullptr,},+ {0xffc7, "0xffc7", nullptr,},+ {0xffc8, "0xffc8", nullptr,},{0xffc9, "DSCR", "DSP DMA Control Reg",},- {0xffca, "0xffca", 0,},+ {0xffca, "0xffca", nullptr,},{0xffcb, "DSBL", "DSP DMA Block Length",},- {0xffcc, "0xffcc", 0,},+ {0xffcc, "0xffcc", nullptr,},{0xffcd, "DSPA", "DSP DMA DMEM Address",},{0xffce, "DSMAH", "DSP DMA Mem Address H",},{0xffcf, "DSMAL", "DSP DMA Mem Address L",},- {0xffd0, "0xffd0",0,},+ {0xffd0, "0xffd0",nullptr,},{0xffd1, "SampleFormat", "SampleFormat",},- {0xffd2, "0xffd2",0,},+ {0xffd2, "0xffd2",nullptr,},{0xffd3, "UnkZelda", "Unk Zelda reads/writes from/to it",},{0xffd4, "ACSAH", "Accelerator start address H",},{0xffd5, "ACSAL", "Accelerator start address L",},{0xffdc, "yn2", "yn2",},{0xffdd, "ARAM", "Direct Read from ARAM (uses ADPCM)",},{0xffde, "GAIN", "Gain",},- {0xffdf, "0xffdf", 0,},- {0xffe0, "0xffe0",0,},- {0xffe1, "0xffe1",0,},- {0xffe2, "0xffe2",0,},- {0xffe3, "0xffe3",0,},- {0xffe4, "0xffe4",0,},- {0xffe5, "0xffe5",0,},- {0xffe6, "0xffe6",0,},- {0xffe7, "0xffe7",0,},- {0xffe8, "0xffe8",0,},- {0xffe9, "0xffe9",0,},- {0xffea, "0xffea",0,},- {0xffeb, "0xffeb",0,},- {0xffec, "0xffec",0,},- {0xffed, "0xffed",0,},- {0xffee, "0xffee",0,},+ {0xffdf, "0xffdf", nullptr,},+ {0xffe0, "0xffe0",nullptr,},+ {0xffe1, "0xffe1",nullptr,},+ {0xffe2, "0xffe2",nullptr,},+ {0xffe3, "0xffe3",nullptr,},+ {0xffe4, "0xffe4",nullptr,},+ {0xffe5, "0xffe5",nullptr,},+ {0xffe6, "0xffe6",nullptr,},+ {0xffe7, "0xffe7",nullptr,},+ {0xffe8, "0xffe8",nullptr,},+ {0xffe9, "0xffe9",nullptr,},+ {0xffea, "0xffea",nullptr,},+ {0xffeb, "0xffeb",nullptr,},+ {0xffec, "0xffec",nullptr,},+ {0xffed, "0xffed",nullptr,},+ {0xffee, "0xffee",nullptr,},{0xffef, "AMDM", "ARAM DMA Request Mask",},- {0xfff0, "0xfff0",0,},- {0xfff1, "0xfff1",0,},- {0xfff2, "0xfff2",0,},- {0xfff3, "0xfff3",0,},- {0xfff4, "0xfff4",0,},- {0xfff5, "0xfff5",0,},- {0xfff6, "0xfff6",0,},- {0xfff7, "0xfff7",0,},- {0xfff8, "0xfff8",0,},- {0xfff9, "0xfff9",0,},- {0xfffa, "0xfffa",0,},+ {0xfff0, "0xfff0",nullptr,},+ {0xfff1, "0xfff1",nullptr,},+ {0xfff2, "0xfff2",nullptr,},+ {0xfff3, "0xfff3",nullptr,},+ {0xfff4, "0xfff4",nullptr,},+ {0xfff5, "0xfff5",nullptr,},+ {0xfff6, "0xfff6",nullptr,},+ {0xfff7, "0xfff7",nullptr,},+ {0xfff8, "0xfff8",nullptr,},+ {0xfff9, "0xfff9",nullptr,},+ {0xfffa, "0xfffa",nullptr,},{0xfffb, "DIRQ", "DSP IRQ Request",},{0xfffc, "DMBH", "DSP Mailbox H",},{0xfffd, "DMBL", "DSP Mailbox L",},{- for (auto& pdlabel : pdlabels)+ for (const pdlabel_t& pdlabel : pdlabels){{- for (auto& ext : opcodes_ext)+ for (const DSPOPCTemplate& ext : opcodes_ext){{+ {{+ {+ {{- for (auto& opcode : opcodes)+ for (const DSPOPCTemplate& opcode : opcodes){+ {{- if (emitter.blockLinks[dest] != 0 )+ if (emitter.blockLinks[dest] != nullptr ){- return NULL;+ return nullptr;{- for(auto& xreg : xregs)+ for (X64CachedReg& xreg : xregs){- for(auto& xreg : xregs)+ for (X64CachedReg& xreg : xregs){@@ -533,7 +533,7 @@ void DSPJitRegCache::popRegs() {- for(auto& xreg : xregs)+ for (X64CachedReg& xreg : xregs){{{- for(size_t i = 0; i < sizeof(alloc_order)/sizeof(alloc_order[0]); i++)+ for (X64Reg reg : alloc_order){{- for(size_t i = 0; i < sizeof(alloc_order)/sizeof(alloc_order[0]); i++)+ for (X64Reg reg : alloc_order){{{- for(auto& x : alloc_order)+ for (X64Reg x : alloc_order){{- PtrOffset(&g_dsp.reg_stack[stack_reg][0],0)), R(tmp1));+ PtrOffset(&g_dsp.reg_stack[stack_reg][0],nullptr)), R(tmp1));- PtrOffset(&g_dsp.reg_stack[stack_reg][0],0)));+ PtrOffset(&g_dsp.reg_stack[stack_reg][0],nullptr)));- m_pData(NULL)+ m_pData(nullptr){{- if (m_pData != NULL)+ if (m_pData != nullptr){- m_pData = NULL;+ m_pData = nullptr;{PPCDebugInterface(){}- virtual int GetInstructionSize(int /*instruction*/) final {return 4;}+ virtual int GetInstructionSize(int /*instruction*/) final override {return 4;}enum {- virtual void Step() final {}+ virtual void Step() final override {}- return NULL;+ return nullptr;{- return NULL;+ return nullptr;-void FifoDataFile::PadFile(u32 numBytes, File::IOFile &file)+void FifoDataFile::PadFile(u32 numBytes, File::IOFile& file){{{- return (m_File != NULL);+ return (m_File != nullptr);{- m_File = NULL;+ m_File = nullptr;{{- u8 *mem = NULL;+ u8 *mem = nullptr;- m_BpMem(NULL)+ m_BpMem(nullptr){{{- if (symbol > 0){{{- if (symbol > 0){{- if (symbol > 0){{- if (select(self->fd + 1, &rfds, NULL, NULL, &timeout) <= 0)+ if (select(self->fd + 1, &rfds, nullptr, nullptr, &timeout) <= 0)- status = RegEnumKeyEx(netcard_key, i, enum_name, &len, NULL, NULL, NULL, NULL);+ status = RegEnumKeyEx(netcard_key, i, enum_name, &len, nullptr, nullptr, nullptr, nullptr);{- status = RegQueryValueEx(unit_key, component_id_string, NULL,+ status = RegQueryValueEx(unit_key, component_id_string, nullptr,{- status = RegQueryValueEx(unit_key, net_cfg_instance_id_string, NULL,+ status = RegQueryValueEx(unit_key, net_cfg_instance_id_string, nullptr,- &len, NULL, NULL, NULL, NULL);+ &len, nullptr, nullptr, nullptr, nullptr);{- status = RegQueryValueEx(connection_key, name_string, NULL,+ status = RegQueryValueEx(connection_key, name_string, nullptr,- &info, sizeof(info), &info, sizeof(info), &len, NULL))+ &info, sizeof(info), &info, sizeof(info), &len, nullptr)){- &status, sizeof(status), &status, sizeof(status), &len, NULL))+ &status, sizeof(status), &status, sizeof(status), &len, nullptr)){{- if ((mHRecvEvent = CreateEvent(NULL, false, false, NULL)) == NULL)+ if ((mHRecvEvent = CreateEvent(nullptr, false, false, nullptr)) == nullptr){{- static Common::Event *m_SyncEvent = NULL;+ static Common::Event *m_SyncEvent = nullptr;{- m_SyncEvent = NULL;+ m_SyncEvent = nullptr;{- m_SyncEvent = NULL;+ m_SyncEvent = nullptr;{- m_SyncEvent = NULL;+ m_SyncEvent = nullptr;- static void StepOpcode(Common::Event *event = 0);+ static void StepOpcode(Common::Event *event = nullptr);- ptr = NULL;+ ptr = nullptr;{- g_ARAM.ptr = NULL;+ g_ARAM.ptr = nullptr;- dsp_emulator = NULL;+ dsp_emulator = nullptr;{- soundStream = NULL;+ soundStream = nullptr;{{- if (m_pUCode != NULL)+ if (m_pUCode != nullptr){- if (m_pUCode != NULL)+ if (m_pUCode != nullptr){- if (m_pUCode != NULL) {+ if (m_pUCode != nullptr) {{- m_pUCode = NULL;+ m_pUCode = nullptr;{- if (m_lastUCode == NULL)+ if (m_lastUCode == nullptr){{- m_lastUCode = NULL;+ m_lastUCode = nullptr;- soundStream = NULL;+ soundStream = nullptr;- m_coeffs_available ? m_coeffs : NULL);+ m_coeffs_available ? m_coeffs : nullptr);{- int* buffers[3] = { 0 };+ int* buffers[3] = { nullptr };{{- m_coeffs_available ? m_coeffs : NULL);+ m_coeffs_available ? m_coeffs : nullptr);{- m_coeffs_available ? m_coeffs : NULL);+ m_coeffs_available ? m_coeffs : nullptr);- int* buffers[3] = { 0 };+ int* buffers[3] = { nullptr };int* main_buffers[3] = {- return NULL;+ return nullptr;{DSPDebugInterface(){}- virtual int GetInstructionSize(int instruction) final {return 1;}- virtual void Step() final {}+ virtual int GetInstructionSize(int instruction) final override {return 1;}+ virtual void Step() final override {}{- soundStream = NULL;+ soundStream = nullptr;- soundStream = NULL;+ soundStream = nullptr;- virtual bool IsLLE() { return true; }+ virtual bool IsLLE() override { return true; }- return 0;+ return nullptr;{- channel = NULL;+ channel = nullptr;- return NULL;+ return nullptr;- if (pDevice != NULL)+ if (pDevice != nullptr){- if (pDevice == NULL)+ if (pDevice == nullptr)- return NULL;+ return nullptr;- return NULL;+ return nullptr;{- IEXIDevice* result = NULL;+ IEXIDevice* result = nullptr;{- if (result != NULL)+ if (result != nullptr)virtual void SetCS(int) {}virtual void DoState(PointerWrap&) {}virtual void PauseAndLock(bool doLock, bool unpauseOnUnlock=true) {}- virtual IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex=-1) { return (device_type == m_deviceType) ? this : NULL; }+ virtual IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex=-1) { return (device_type == m_deviceType) ? this : nullptr; }virtual void Update() {}- m_pIPL = NULL;+ m_pIPL = nullptr;+ virtual void TransferByte(u8 &_uByte) override;bool IsWriteCommand() const { return !!(m_uAddress & (1 << 31)); }u32 CommandRegion() const { return (m_uAddress & ~(1 << 31)) >> 8; }{- SplitPath(data->filename, &dir, 0, 0);+ SplitPath(data->filename, &dir, nullptr, nullptr);- memory_card_content = NULL;+ memory_card_content = nullptr;{{- return NULL;+ return nullptr;- return NULL;+ return nullptr;+ virtual void TransferByte(u8 &byte) override;{- SplitPath(filename, NULL, NULL, &fileType);+ SplitPath(filename, nullptr, nullptr, &fileType);{PanicAlertT("File has the extension \"%s\"\nvalid extensions are (.raw/.gcp)", fileType.c_str());- SplitPath(inputFile, NULL, NULL, &fileType);+ SplitPath(inputFile, nullptr, nullptr, &fileType);- SplitPath(fileName, NULL, NULL, &fileType);+ SplitPath(fileName, nullptr, nullptr, &fileType);{-u8* base = NULL;+u8* base = nullptr;{{&m_pRAM, &m_pPhysicalRAM, 0x00000000, RAM_SIZE, 0},- {NULL, &m_pVirtualCachedRAM, 0x80000000, RAM_SIZE, MV_MIRROR_PREVIOUS},- {NULL, &m_pVirtualUncachedRAM, 0xC0000000, RAM_SIZE, MV_MIRROR_PREVIOUS},+ {nullptr, &m_pVirtualCachedRAM, 0x80000000, RAM_SIZE, MV_MIRROR_PREVIOUS},+ {nullptr, &m_pVirtualUncachedRAM, 0xC0000000, RAM_SIZE, MV_MIRROR_PREVIOUS},{&m_pFakeVMEM, &m_pVirtualFakeVMEM, 0x7E000000, FAKEVMEM_SIZE, MV_FAKE_VMEM},{&m_pEXRAM, &m_pPhysicalEXRAM, 0x10000000, EXRAM_SIZE, MV_WII_ONLY},- {NULL, &m_pVirtualCachedEXRAM, 0x90000000, EXRAM_SIZE, MV_WII_ONLY | MV_MIRROR_PREVIOUS},- {NULL, &m_pVirtualUncachedEXRAM, 0xD0000000, EXRAM_SIZE, MV_WII_ONLY | MV_MIRROR_PREVIOUS},+ {nullptr, &m_pVirtualCachedEXRAM, 0x90000000, EXRAM_SIZE, MV_WII_ONLY | MV_MIRROR_PREVIOUS},+ {nullptr, &m_pVirtualUncachedEXRAM, 0xD0000000, EXRAM_SIZE, MV_WII_ONLY | MV_MIRROR_PREVIOUS},- base = NULL;+ base = nullptr;{- if (ptr != NULL)+ if (ptr != nullptr){- if ((dst != NULL) && (src != NULL) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0)+ if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0){- if ((dst != NULL) && (src != NULL) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0)+ if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0){- return NULL;+ return nullptr;{- g_Channel[_iDeviceNumber].m_pDevice = NULL;+ g_Channel[_iDeviceNumber].m_pDevice = nullptr;+ virtual int RunBuffer(u8* _pBuffer, int _iLength) override;+ virtual bool GetData(u32& _Hi, u32& _Low) override;+ virtual void SendCommand(u32 _Cmd, u8 _Poll) override;+ virtual void DoState(PointerWrap& p) override;CSIDevice_TaruKonga(SIDevices device, int _iDeviceNumber) : CSIDevice_GCController(device, _iDeviceNumber) { }+ virtual bool GetData(u32& _Hi, u32& _Low) override{+ virtual int RunBuffer(u8* _pBuffer, int _iLength) override;+ virtual bool GetData(u32& _Hi, u32& _Low) override;+ virtual void SendCommand(u32 _Cmd, u8 _Poll) override;+ virtual void DoState(PointerWrap& p) override;+ {+ {{+ {- for (int i = 0; i < 4; i++)+ for (UVIInterruptRegister& reg : m_InterruptRegister){+ {case WM_SPACE_REGS2: {- void *region_ptr = NULL;+ void *region_ptr = nullptr;- void *region_ptr = NULL;+ void *region_ptr = nullptr;- void *region_ptr = NULL;+ void *region_ptr = nullptr;- void *region_ptr = NULL;+ void *region_ptr = nullptr;-// , m_sound_stream( NULL )+// , m_sound_stream( nullptr ){+ std::string GetName() const override;+ void LoadDefaults(const ControllerInterface& ciface) override;- void RequestStatus(const wm_request_status* const rs = NULL);+ void RequestStatus(const wm_request_status* const rs = nullptr);{- found_board = NULL;+ found_board = nullptr;{- device_id = hci_get_route(NULL);+ device_id = hci_get_route(nullptr);{inquiry_info scan_infos[max_infos] = {};- found_board = NULL;+ found_board = nullptr;- int const found_devices = hci_inquiry(device_id, wait_len, max_infos, NULL, &scan_infos_ptr, IREQ_CACHE_FLUSH);+ int const found_devices = hci_inquiry(device_id, wait_len, max_infos, nullptr, &scan_infos_ptr, IREQ_CACHE_FLUSH);{- if (select(int_sock + 1, &fds, NULL, NULL, NULL) == -1)+ if (select(int_sock + 1, &fds, nullptr, nullptr, nullptr) == -1){- HDEVINFO const device_info = SetupDiGetClassDevs(&device_id, NULL, NULL, (DIGCF_DEVICEINTERFACE | DIGCF_PRESENT));+ HDEVINFO const device_info = SetupDiGetClassDevs(&device_id, nullptr, nullptr, (DIGCF_DEVICEINTERFACE | DIGCF_PRESENT));- PSP_DEVICE_INTERFACE_DETAIL_DATA detail_data = NULL;+ PSP_DEVICE_INTERFACE_DETAIL_DATA detail_data = nullptr;- for (int index = 0; SetupDiEnumDeviceInterfaces(device_info, NULL, &device_id, index, &device_data); ++index)+ for (int index = 0; SetupDiEnumDeviceInterfaces(device_info, nullptr, &device_id, index, &device_data); ++index){- SetupDiGetDeviceInterfaceDetail(device_info, &device_data, NULL, 0, &len, NULL);+ SetupDiGetDeviceInterfaceDetail(device_info, &device_data, nullptr, 0, &len, nullptr);- if (SetupDiGetDeviceInterfaceDetail(device_info, &device_data, detail_data, len, NULL, NULL))+ if (SetupDiGetDeviceInterfaceDetail(device_info, &device_data, detail_data, len, nullptr, nullptr)){{- hid_overlap_write.hEvent = CreateEvent(NULL, true, false, NULL);+ hid_overlap_write.hEvent = CreateEvent(nullptr, true, false, nullptr);{- hid_overlap_read.hEvent = CreateEvent(NULL, true, false, NULL);+ hid_overlap_read.hEvent = CreateEvent(nullptr, true, false, nullptr);{- if (NULL != hFindRadio)+ if (nullptr != hFindRadio){- NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);+ nullptr, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, nullptr);{- hid_overlap_read.hEvent = CreateEvent(NULL, true, false, NULL);+ hid_overlap_read.hEvent = CreateEvent(nullptr, true, false, nullptr);- hid_overlap_write.hEvent = CreateEvent(NULL, true, false, NULL);+ hid_overlap_write.hEvent = CreateEvent(nullptr, true, false, nullptr);- WiimoteEmu::Spy(NULL, buf, bytes + 1);+ WiimoteEmu::Spy(nullptr, buf, bytes + 1);{- WiimoteEmu::Spy(NULL, buf, len);+ WiimoteEmu::Spy(nullptr, buf, len);{{- hFindDevice = NULL;+ hFindDevice = nullptr;{- hFindRadio = NULL;+ hFindRadio = nullptr;- const DWORD auth_result = Bth_BluetoothAuthenticateDevice(NULL, hRadio, &btdi,+ const DWORD auth_result = Bth_BluetoothAuthenticateDevice(nullptr, hRadio, &btdi,{- WiimoteReal::Wiimote *wm = NULL;+ WiimoteReal::Wiimote *wm = nullptr;{- if (WiimoteReal::g_wiimotes[i] == NULL)+ if (WiimoteReal::g_wiimotes[i] == nullptr)- if (wm == NULL) {+ if (wm == nullptr) {{- WiimoteReal::Wiimote *wm = NULL;+ WiimoteReal::Wiimote *wm = nullptr;{- if (WiimoteReal::g_wiimotes[i] == NULL)+ if (WiimoteReal::g_wiimotes[i] == nullptr)- if (wm == NULL) {+ if (wm == nullptr) {- found_board = NULL;+ found_board = nullptr;{- m_wiimote_thread_run_loop = NULL;+ m_wiimote_thread_run_loop = nullptr;{- m_wiimote_thread_run_loop = NULL;+ m_wiimote_thread_run_loop = nullptr;{- Wiimote* found_board = NULL;+ Wiimote* found_board = nullptr;{- Wiimote* found_board = NULL;+ Wiimote* found_board = nullptr;{{{- wm = NULL;+ wm = nullptr;{- wm = NULL;+ wm = nullptr;{- g_wiimotes[index] = NULL;+ g_wiimotes[index] = nullptr;{- Wiimote* wm = NULL;+ Wiimote* wm = nullptr;{{- Wiimote* found_board = NULL;+ Wiimote* found_board = nullptr;{- if (select(0, &read_fds, NULL, NULL, &t) > 0)+ if (select(0, &read_fds, nullptr, nullptr, &t) > 0){{{- g_FdMap[i] = NULL;+ dev = nullptr;+ u32 i = 0;g_DeviceMap[i] = new CWII_IPC_HLE_Device_usb_oh1_57e_305(i, std::string("/dev/usb/oh1/57e/305")); i++;g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_immediate(i, std::string("/dev/stm/immediate")); i++;g_DeviceMap[i] = new CWII_IPC_HLE_Device_stm_eventhook(i, std::string("/dev/stm/eventhook")); i++;g_DeviceMap[i] = new CWII_IPC_HLE_Device_fs(i, std::string("/dev/fs")); i++;- // IOS allows two ES devices at a time<{g_DeviceMap[i] = es_handles[j] = new CWII_IPC_HLE_Device_es(i, std::string("/dev/es")); i++;{- for (u32 i=0; i<IPC_MAX_FDS; i++)+ for (IWII_IPC_HLE_Device*& dev : g_FdMap){- if (g_FdMap[i] != NULL && !g_FdMap[i]->IsHardware())+ if (dev != nullptr && !dev->IsHardware()){- g_FdMap[i] = NULL;+ dev = nullptr;- for (u32 j=0; j<ES_MAX_COUNT; j++)+ for (bool& in_use : es_inuse){- es_inuse[j] = false;+ in_use = false;{{- if (g_FdMap[i] == NULL)+ if (g_FdMap[i] == nullptr){{+ {- return NULL;+ return nullptr;{+ {- return NULL;+ return nullptr;{- IWII_IPC_HLE_Device* pDevice = NULL;+ IWII_IPC_HLE_Device* pDevice = nullptr;{- g_FdMap[i] = NULL;+ g_FdMap[i] = nullptr;{- for (u32 i=0; i<IPC_MAX_FDS; i++)+ for (IWII_IPC_HLE_Device*& dev : g_FdMap){- u32 exists = g_FdMap[i] ? 1 : 0;+ u32 exists = dev ? 1 : 0;{- u32 isHw = g_FdMap[i]->IsHardware() ? 1 : 0;+ u32 isHw = dev->IsHardware() ? 1 : 0;{- u32 hwId = g_FdMap[i]->GetDeviceID();+ u32 hwId = dev->GetDeviceID();{- g_FdMap[i]->DoState(p);+ dev->DoState(p);- IWII_IPC_HLE_Device* pDevice = (DeviceID >= 0 && DeviceID < IPC_MAX_FDS) ? g_FdMap[DeviceID] : NULL;+ IWII_IPC_HLE_Device* pDevice = (DeviceID >= 0 && DeviceID < IPC_MAX_FDS) ? g_FdMap[DeviceID] : nullptr;{- pDevice = NULL;+ pDevice = nullptr;- g_FdMap[DeviceID] = NULL;+ g_FdMap[DeviceID] = nullptr;{- pDevice = NULL;+ pDevice = nullptr;{+ bool Open(u32 CommandAddress, u32 Mode) override{+ bool Close(u32 CommandAddress, bool bForce = false) override{+ bool IOCtl(u32 CommandAddress) override{+ bool IOCtlV(u32 CommandAddress) override{- , m_pFileSystem(NULL)+ , m_pFileSystem(nullptr){}{- m_pFileSystem = NULL;+ m_pFileSystem = nullptr;{- m_pFileSystem = NULL;+ m_pFileSystem = nullptr;{- m_pFileSystem = NULL;+ m_pFileSystem = nullptr;{- const char *pFilename = NULL;+ const char *pFilename = nullptr;- if (pFilename != NULL)+ if (pFilename != nullptr){{- const char *pFilename = NULL;+ const char *pFilename = nullptr;- if (pFilename != NULL)+ if (pFilename != nullptr){+ int GetCmdDelay(u32) override;- , m_pContentLoader(NULL)+ , m_pContentLoader(nullptr){- m_pContentLoader = NULL;+ m_pContentLoader = nullptr;- if (pContent == NULL)+ if (pContent == nullptr){- Access.m_pFile = NULL;+ Access.m_pFile = nullptr;{- _dbg_assert_(WII_IPC_ES, rContent.m_pContent->m_pData != NULL);+ _dbg_assert_(WII_IPC_ES, rContent.m_pContent->m_pData != nullptr);+ virtual void DoState(PointerWrap& p) override;+ virtual bool Open(u32 _CommandAddress, u32 _Mode) override;+ virtual bool Close(u32 _CommandAddress, bool _bForce) override;+ virtual bool IOCtlV(u32 _CommandAddress) override;- SplitPath(FileSearch.GetFileNames()[i], NULL, &name, &ext);+ SplitPath(FileSearch.GetFileNames()[i], nullptr, &name, &ext);+ virtual void DoState(PointerWrap& p) override;+ virtual int GetCmdDelay(u32) override;- libusb_handle_events_timeout(NULL, &tv);+ libusb_handle_events_timeout(nullptr, &tv);{- int ret = libusb_init(NULL);+ int ret = libusb_init(nullptr);{- libusb_exit(NULL);+ libusb_exit(nullptr);- if (dev_handle == NULL)+ if (dev_handle == nullptr){- if (dev_handle == NULL)+ if (dev_handle == nullptr){{{- struct libusb_config_descriptor *config = NULL;+ struct libusb_config_descriptor *config = nullptr;- config = NULL;+ config = nullptr;{{- libusb_device_handle *handle = NULL;+ libusb_device_handle *handle = nullptr;- return NULL;+ return nullptr;- cnt = libusb_get_device_list(NULL, &list);+ cnt = libusb_get_device_list(nullptr, &list);- return NULL;+ return nullptr;{- handle = NULL;+ handle = nullptr;- "%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: %08X",remoteHost->h_addr_list[0] == 0 ? -1 : 0,+ "%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: %08X",remoteHost->h_addr_list[0] == nullptr ? -1 : 0,- ReturnValue = remoteHost->h_addr_list[0] == 0 ? 0 : 1;+ ReturnValue = remoteHost->h_addr_list[0] == nullptr ? 0 : 1;- if (ufds == NULL)+ if (ufds == nullptr){- Memory::Write_U32((u32)NULL, wii_addr);+ Memory::Write_U32(0, wii_addr);{- PIP_ADAPTER_ADDRESSES AdapterAddresses = NULL;+ PIP_ADAPTER_ADDRESSES AdapterAddresses = nullptr;- NULL,+ nullptr,- if (AdapterAddresses != NULL) {+ if (AdapterAddresses != nullptr) {- if (AdapterAddresses == NULL) {+ if (AdapterAddresses == nullptr) {- if (AdapterAddresses != NULL) {+ if (AdapterAddresses != nullptr) {{- struct addrinfo *result = NULL;+ struct addrinfo *result = nullptr;{- char* pNodeName = NULL;+ char* pNodeName = nullptr;- char* pServiceName = NULL;+ char* pServiceName = nullptr;- int ret = getaddrinfo(pNodeName, pServiceName, BufferInSize3 ? &hints : NULL, &result);+ int ret = getaddrinfo(pNodeName, pServiceName, BufferInSize3 ? &hints : nullptr, &result);{- while (result != NULL)+ while (result != nullptr){{}+ virtual bool Open(u32 _CommandAddress, u32 _Mode) override{+ virtual bool Close(u32 _CommandAddress, bool _bForce) override{+ virtual bool IOCtl(u32 _CommandAddress) override{+ virtual u32 Update() override;{- for (int i = 0; i < NET_SSL_MAXINSTANCES; ++i)+ for (WII_SSL& ssl : _SSL){- memset(&_SSL[i], 0, sizeof(WII_SSL));+ memset(&ssl, 0, sizeof(WII_SSL));{- for (int i = 0; i < NET_SSL_MAXINSTANCES; i++)+ for (WII_SSL& ssl : _SSL){- if (_SSL[i].active)+ if (ssl.active){- _SSL[i].active = false;+ ssl.active = false;{{- memset(&_SSL[sslID].ctx, 0, sizeof(ssl_context));+ memset(&ssl->ctx, 0, sizeof(ssl_context));- entropy_init(&_SSL[sslID].entropy);+ entropy_init(&ssl->entropy);{- ssl_free(&_SSL[sslID].ctx);+ ssl_free(&ssl->ctx);- ssl_set_rng(&_SSL[sslID].ctx, ctr_drbg_random, &_SSL[sslID].ctr_drbg);+ ssl_set_rng(&ssl->ctx, ctr_drbg_random, &ssl->ctr_drbg);- ssl_set_max_version(&_SSL[sslID].ctx, SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_2);+ ssl_set_max_version(&ssl->ctx, SSL_MAJOR_VERSION_3, SSL_MINOR_VERSION_2);- ssl_set_session(&_SSL[sslID].ctx, &_SSL[sslID].session);+ ssl_set_session(&ssl->ctx, &ssl->session);- _SSL[sslID].active = true;+ ssl->active = true;{- entropy_free(&_SSL[sslID].entropy);+ entropy_free(&ssl->entropy);- _SSL[sslID].active = false;+ ssl->active = false;{- &_SSL[sslID].cacert,+ &ssl->cacert,{- ssl_set_ca_chain(&_SSL[sslID].ctx, &_SSL[sslID].cacert, NULL, _SSL[sslID].hostname);+ ssl_set_ca_chain(&ssl->ctx, &ssl->cacert, nullptr, ssl->hostname);{{{- ssl_set_own_cert(&_SSL[sslID].ctx, &_SSL[sslID].clicert, &_SSL[sslID].pk);+ ssl_set_own_cert(&ssl->ctx, &ssl->clicert, &ssl->pk);{- ssl_set_own_cert(&_SSL[sslID].ctx, NULL, NULL);+ ssl_set_own_cert(&ssl->ctx, nullptr, nullptr);{- int ret = x509_crt_parse_file(&_SSL[sslID].cacert, (cert_base_path + "rootca.pem").c_str());+ int ret = x509_crt_parse_file(&ssl->cacert, (cert_base_path + "rootca.pem").c_str());{- x509_crt_free(&_SSL[sslID].clicert);+ x509_crt_free(&ssl->clicert);{- ssl_set_ca_chain(&_SSL[sslID].ctx, &_SSL[sslID].cacert, NULL, _SSL[sslID].hostname);+ ssl_set_ca_chain(&ssl->ctx, &ssl->cacert, nullptr, ssl->hostname);{+ virtual bool Open(u32 _CommandAddress, u32 _Mode) override;+ virtual bool Close(u32 _CommandAddress, bool _bForce) override;- , m_Card(NULL)+ , m_Card(nullptr){}+ virtual void DoState(PointerWrap& p) override;{}+ virtual bool Open(u32 _CommandAddress, u32 _Mode) override{+ virtual bool Close(u32 _CommandAddress, bool _bForce) override{+ virtual bool IOCtl(u32 _CommandAddress) override{{+ virtual bool Open(u32 _CommandAddress, u32 _Mode) override{+ virtual bool Close(u32 _CommandAddress, bool _bForce) override{+ virtual bool IOCtl(u32 _CommandAddress) override{{- SetUsbPointer(NULL);+ SetUsbPointer(nullptr);{- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr)- if ((_pData != NULL) && (_DataSize > 0))+ if ((_pData != nullptr) && (_DataSize > 0)){{- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr){- if (pWiiMote == NULL)+ if (pWiiMote == nullptr)- SendEventCommandComplete(pMsg->Opcode, NULL, 0);+ SendEventCommandComplete(pMsg->Opcode, nullptr, 0);{- if (pWiiMote == NULL)+ if (pWiiMote == nullptr)- return NULL;+ return nullptr;PanicAlertT("Can't find WiiMote by connection handle %02x", _ConnectionHandle);- return NULL;+ return nullptr;+ virtual u32 Update() override;+ void DoState(PointerWrap &p) override;ini.Get("USB Keyboard", "Layout", &m_KeyboardLayout, KBD_LAYOUT_QWERTY);+ {- //m_MessageQueue.push(SMessageData(MSG_KBD_CONNECT, 0, NULL));+ //m_MessageQueue.push(SMessageData(MSG_KBD_CONNECT, 0, nullptr));-static CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = NULL;+static CWII_IPC_HLE_Device_usb_oh1_57e_305* s_Usb = nullptr;{{- Wiimote::ControlChannel(m_ConnectionHandle & 0xFF, 99, NULL, 0);+ Wiimote::ControlChannel(m_ConnectionHandle & 0xFF, 99, nullptr, 0);{- int ret = (s32)accept(fd, NULL, 0);+ int ret = (s32)accept(fd, nullptr, 0);- has_destaddr ? (struct sockaddr*)&local_name : NULL,+ has_destaddr ? (struct sockaddr*)&local_name : nullptr,- return 0;+ return nullptr;if (!pollSet) {else {- // poll timeout == -1 : wait forever : select timeout of NULL+ // poll timeout == -1 : wait forever : select timeout of nullptrif (pollTimeout >= 0) {} else {- tvp = NULL;+ tvp = nullptr;-u8* tmpInput = NULL;+u8* tmpInput = nullptr;-ManipFunction mfunc = NULL;+ManipFunction mfunc = nullptr;{- if (tmpInput != NULL)+ if (tmpInput != nullptr){{- if (!g_bReadOnly || tmpInput == NULL)+ if (!g_bReadOnly || tmpInput == nullptr){{- if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == NULL)+ if (!IsPlayingInput() || !IsUsingPad(controllerID) || tmpInput == nullptr){- if(!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == NULL)+ if(!IsPlayingInput() || !IsUsingWiimote(wiimote) || tmpInput == nullptr)- //tmpInput = NULL;+ //tmpInput = nullptr;{- tmpInput = NULL;+ tmpInput = nullptr;-static NetPlayClient * netplay_client = NULL;+static NetPlayClient * netplay_client = nullptr;{+ {{+ {- for (unsigned int i = 0; i < 4; ++i)+ for (PadMapping mapping : m_pad_map){+ {- for (unsigned int i = 0; i < 4; ++i)+ for (PadMapping mapping : m_wiimote_map){+ {{- return netplay_client != NULL;+ return netplay_client != nullptr;{- netplay_client = NULL;+ netplay_client = nullptr;- for (unsigned int m = 0; m < 4; ++m)+ for (PadMapping& mapping : m_pad_map){- if (m_pad_map[m] == -1)+ if (mapping == -1){- m_pad_map[m] = player.pid;+ mapping = player.pid;{- for (int i = 0; i < 4; i++)+ for (PadMapping mapping : m_pad_map){- if (m_pad_map[i] == pid)+ if (mapping == pid){PanicAlertT("Client disconnect while game is running!! NetPlay is disabled. You must manually stop the game.");+ {+ {+ {+ {{+ {{+ {{+ {+ {- UPNPDev *devlist = upnpDiscover(2000, NULL, NULL, 0, 0, &upnperror);+ UPNPDev *devlist = upnpDiscover(2000, nullptr, nullptr, 0, 0, &upnperror);{{- descXML = 0;+ descXML = nullptr;(std::string("dolphin-emu TCP on ") + addr).c_str(),- "TCP", NULL, NULL);+ "TCP", nullptr, nullptr);- port_str, "TCP", NULL);+ port_str, "TCP", nullptr);- return NULL;+ return nullptr;for (i = 0; i < GDB_MAX_BP; i++) {- return NULL;+ return nullptr;for (i = 0; i < GDB_MAX_BP; i++) {- return NULL;+ return nullptr;do {- if (p != NULL) {+ if (p != nullptr) {- } while (p != NULL);+ } while (p != nullptr);- if (p == NULL)+ if (p == nullptr)for (i = 0; i < GDB_MAX_BP; i++) {@@ -288,7 +288,7 @@ static int gdb_data_available() {- if (select(sock + 1, fds, NULL, NULL, &t) < 0)+ if (select(sock + 1, fds, nullptr, nullptr, &t) < 0){{- if (bp == NULL)+ if (bp == nullptr)- // MessageBox(NULL, "PSE in HID2 is set", "Warning", MB_OK);+ // MessageBox(nullptr, "PSE in HID2 is set", "Warning", MB_OK);{- m_infoTable59[i] = 0;+ m_infoTable59[i] = nullptr;-RegCache::RegCache() : emit(0)+RegCache::RegCache() : emit(nullptr){@@ -48,8 +48,8 @@ struct RegInfo {RegInfo(JitIL* j, InstLoc f, unsigned insts) : Jit(j), FirstI(f), IInfo(insts), lastUsed(insts) {for (unsigned i = 0; i < MAX_NUMBER_OF_REGS; i++) {@@ -65,9 +65,9 @@ static u32 regsInUse(RegInfo& R) {{- if (R.regs[i] != 0)+ if (R.regs[i] != nullptr)- if (R.fregs[i] != 0)+ if (R.fregs[i] != nullptr)@@ -112,7 +112,7 @@ static void regSpill(RegInfo& RI, X64Reg reg) {- RI.regs[reg] = 0;+ RI.regs[reg] = nullptr;static OpArg fregLocForSlot(RegInfo& RI, unsigned slot) {@@ -136,7 +136,7 @@ static void fregSpill(RegInfo& RI, X64Reg reg) {- RI.fregs[reg] = 0;+ RI.fregs[reg] = nullptr;@@ -164,11 +164,11 @@ static void fregSpill(RegInfo& RI, X64Reg reg) {static X64Reg regFindFreeReg(RegInfo& RI) {- if (RI.regs[reg] == 0)+ if (RI.regs[reg] == nullptr)- InstLoc bestEnd = 0;+ InstLoc bestEnd = nullptr;for (int i = 0; i < RegAllocSize; ++i) {@@ -185,11 +185,11 @@ static X64Reg regFindFreeReg(RegInfo& RI) {static X64Reg fregFindFreeReg(RegInfo& RI) {- if (RI.fregs[reg] == 0)+ if (RI.fregs[reg] == nullptr)- InstLoc bestEnd = 0;+ InstLoc bestEnd = nullptr;for (int i = 0; i < FRegAllocSize; ++i) {@@ -229,13 +229,13 @@ static OpArg fregLocForInst(RegInfo& RI, InstLoc I) {static void regClearInst(RegInfo& RI, InstLoc I) {- RI.regs[reg] = 0;+ RI.regs[reg] = nullptr;static void fregClearInst(RegInfo& RI, InstLoc I) {- RI.fregs[reg] = 0;+ RI.fregs[reg] = nullptr;static X64Reg regEnsureInReg(RegInfo& RI, InstLoc I) {@@ -490,7 +490,7 @@ static OpArg regImmForConst(RegInfo& RI, InstLoc I, unsigned Size) {static void regEmitMemStore(RegInfo& RI, InstLoc I, unsigned Size) {- auto info = regBuildMemAddress(RI, I, getOp2(I), 2, Size, 0);+ auto info = regBuildMemAddress(RI, I, getOp2(I), 2, Size, nullptr);{- sprintf(buffer, "JitIL_profiling_%d.csv", (int)time(NULL));+ sprintf(buffer, "JitIL_profiling_%d.csv", (int)time(nullptr));- setvbuf(file.GetHandle(), NULL, _IOFBF, 1024 * 1024);+ setvbuf(file.GetHandle(), nullptr, _IOFBF, 1024 * 1024);{JitBlockCache *GetBlockCache() override { return &blocks; }- const u8 *BackPatch(u8 *codePtr, u32 em_address, void *ctx) override { return NULL; };+ const u8 *BackPatch(u8 *codePtr, u32 em_address, void *ctx) override { return nullptr; };bool IsInCodeSpace(u8 *ptr) override { return IsInSpace(ptr); }JitBaseBlockCache *GetBlockCache() { return &blocks; }- const u8 *BackPatch(u8 *codePtr, u32 em_address, void *ctx) { return NULL; }+ const u8 *BackPatch(u8 *codePtr, u32 em_address, void *ctx) { return nullptr; }bool IsInCodeSpace(u8 *ptr) { return IsInSpace(ptr); }- return 0; // this will become a regular crash real soon after this+ return nullptr; // this will become a regular crash real soon after thisInstructionInfo info = {};if (!DisassembleMov(codePtr, &info)) {BackPatchError("BackPatch - failed to disassemble MOV instruction", codePtr, emAddress);- return 0;+ return nullptr;{PanicAlert("BackPatch : Base reg not RBX."- return 0;+ return nullptr;{PanicAlert("BackPatch: no register use entry for address %p", codePtr);- return 0;+ return nullptr;- if (iCache == 0 && iCacheEx == 0 && iCacheVMEM == 0)+ if (iCache == nullptr && iCacheEx == nullptr && iCacheVMEM == nullptr){{PanicAlert("JitBaseBlockCache::Init() - iCache is already initialized");- if (iCache == 0 || iCacheEx == 0 || iCacheVMEM == 0)+ if (iCache == nullptr || iCacheEx == nullptr || iCacheVMEM == nullptr){PanicAlert("JitBaseBlockCache::Init() - unable to allocate iCache");{- if (iCache != 0)+ if (iCache != nullptr)- iJIT_NotifyEvent(iJVM_EVENT_TYPE_SHUTDOWN, NULL);+ iJIT_NotifyEvent(iJVM_EVENT_TYPE_SHUTDOWN, nullptr);- iCache(0), iCacheEx(0), iCacheVMEM(0) {}+ iCache(nullptr), iCacheEx(nullptr), iCacheVMEM(nullptr) {}@@ -261,7 +261,7 @@ InstLoc IRBuilder::FoldZeroOp(unsigned Opcode, unsigned extra) {if (Opcode == LoadFRegDENToZero) {- FRegCacheStore[extra] = 0; // prevent previous store operation from zapping+ FRegCacheStore[extra] = nullptr; // prevent previous store operation from zapping@@ -844,7 +844,7 @@ InstLoc IRBuilder::FoldBranchCond(InstLoc Op1, InstLoc Op2) {if (isImm(*Op1)) {- return 0;+ return nullptr;@@ -999,19 +999,19 @@ InstLoc IRBuilder::FoldICmpCRUnsigned(InstLoc Op1, InstLoc Op2) {InstLoc IRBuilder::FoldFallBackToInterpreter(InstLoc Op1, InstLoc Op2) {for (unsigned i = 0; i < 32; i++) {for (unsigned i = 0; i < 8; i++) {@@ -1210,19 +1210,19 @@ InstLoc IRBuilder::isNeg(InstLoc I) const {- return NULL;+ return nullptr;{- Writer() : file(NULL)+ Writer() : file(nullptr){- sprintf(buffer, "JitIL_IR_%d.txt", (int)time(NULL));+ sprintf(buffer, "JitIL_IR_%d.txt", (int)time(nullptr));- setvbuf(file.GetHandle(), NULL, _IOFBF, 1024 * 1024);+ setvbuf(file.GetHandle(), nullptr, _IOFBF, 1024 * 1024);virtual ~Writer() {}@@ -547,19 +547,19 @@ class IRBuilder {for (unsigned i = 0; i < 32; i++) {for (unsigned i = 0; i < 8; i++) {IRBuilder() { Reset(); }static IREmitter::InstLoc TestBranch(IREmitter::IRBuilder& ibuild, UGeckoInstruction inst) {- IREmitter::InstLoc CRTest = 0, CTRTest = 0;+ IREmitter::InstLoc CRTest = nullptr, CTRTest = nullptr;{- IREmitter::InstLoc a = NULL;+ IREmitter::InstLoc a = nullptr;- default: PanicAlert("lXz: invalid access size"); val = 0; break;+ default: PanicAlert("lXz: invalid access size"); val = nullptr; break;- CPUCoreBase *ptr = NULL;+ CPUCoreBase *ptr = nullptr;{{PanicAlert("Unrecognizable cpu_core: %d", core);{- jit = NULL;+ jit = nullptr;{- return 0;+ return nullptr;{- return 0;+ return nullptr;{- return 0; //found a dud :(+ return nullptr; //found a dud :({- return 0;+ return nullptr;- return 0;+ return nullptr;- if (namepos != 0) //would be odd if not :P+ if (namepos != nullptr) //would be odd if not :P- return 0;+ return nullptr;{- return 0;+ return nullptr;- return 0;+ return nullptr;{- return 0;+ return nullptr;{- return info ? info->opname : 0;+ return info ? info->opname : nullptr;{- return info != 0;+ return info != nullptr;{- cpu_core_base = NULL;+ cpu_core_base = nullptr;-static CallbackFunc g_onAfterLoadCb = NULL;+static CallbackFunc g_onAfterLoadCb = nullptr;{- u8* ptr = NULL;+ u8* ptr = nullptr;- u8 *ptr = NULL;+ u8 *ptr = nullptr;- const int res = lzo1x_decompress(out, cur_len, &buffer[i], &new_len, NULL);+ const int res = lzo1x_decompress(out, cur_len, &buffer[i], &new_len, nullptr);{{-DiscIO::IVolume* g_pVolume = NULL;+DiscIO::IVolume* g_pVolume = nullptr;{- g_pVolume = NULL;+ g_pVolume = nullptr;{- g_pVolume = NULL;+ g_pVolume = nullptr;- return (g_pVolume != NULL);+ return (g_pVolume != nullptr);{- g_pVolume = NULL;+ g_pVolume = nullptr;{- if (g_pVolume != NULL)+ if (g_pVolume != nullptr){{- if (g_pVolume != NULL && ptr)+ if (g_pVolume != nullptr && ptr){{- if (g_pVolume != NULL && ptr)+ if (g_pVolume != nullptr && ptr){{- return (g_pVolume != NULL);+ return (g_pVolume != nullptr);-// if NG_priv iis NULL or NG_sig is NULL or NG_id is 0 or NG_key_id is 0, default values+// if NG_priv iis nullptr or NG_sig is nullptr or NG_id is 0 or NG_key_id is 0, default values{- if ((NG_id==0)||(NG_key_id==0)||(NG_priv==NULL)||(NG_sig==NULL))+ if ((NG_id==0)||(NG_key_id==0)||(NG_priv==nullptr)||(NG_sig==nullptr)){-// if NG_priv is NULL or NG_id is 0, it will use builtin defaults+// if NG_priv is nullptr or NG_id is 0, it will use builtin defaults{- if ((NG_id==0)||(NG_priv == NULL))+ if ((NG_id==0)||(NG_priv == nullptr)){-// if NG_priv is NULL, default builtin will be used+// if NG_priv is nullptr, default builtin will be used{- if (NG_priv==NULL)+ if (NG_priv==nullptr){- mach_msg_header_t *send_msg = NULL;+ mach_msg_header_t *send_msg = nullptr;PanicAlertT("InstallExceptionHandler called, but this platform does not yet support it.");- sa.sa_handler = 0;+ sa.sa_handler = nullptr;- sigaction(SIGSEGV, &sa, NULL);+ sigaction(SIGSEGV, &sa, nullptr);- return NULL;+ return nullptr;{- : m_pBannerFile(NULL)+ : m_pBannerFile(nullptr){{- m_pBannerFile = NULL;+ m_pBannerFile = nullptr;+ virtual bool IsValid() override;+ virtual std::vector<u32> GetBanner(int* pWidth, int* pHeight) override;{- : m_pBannerFile(NULL)+ : m_pBannerFile(nullptr){{- m_pBannerFile = NULL;+ m_pBannerFile = nullptr;- // Trim at first NULL+ // Trim at first nullptr+ virtual bool IsValid() override;+ virtual std::vector<u32> GetBanner(int* pWidth, int* pHeight) override;SectorReader::~SectorReader() {+ {- return 0;+ return nullptr;+ virtual bool Read(u64 offset, u64 size, u8 *out_ptr) override;- CompressCB callback = 0, void *arg = 0);+ CompressCB callback = nullptr, void *arg = nullptr);- CompressCB callback = 0, void *arg = 0);+ CompressCB callback = nullptr, void *arg = nullptr);- return NULL;+ return nullptr;- return 0;+ return nullptr;const CompressedBlobHeader &GetHeader() const { return header; }- u64 GetDataSize() const { return header.data_size; }- u64 GetRawSize() const { return file_size; }+ u64 GetDataSize() const override { return header.data_size; }+ u64 GetRawSize() const override { return file_size; }+ void GetBlock(u64 block_num, u8 *out_ptr) override;-u8* m_FreeTable = NULL;+u8* m_FreeTable = nullptr;-IVolume* m_Disc = NULL;+IVolume* m_Disc = nullptr;{- m_Disc = NULL;+ m_Disc = nullptr;{- m_FreeTable = NULL;+ m_FreeTable = nullptr;auto const path = UTF8ToTStr(std::string("\\\\.\\") + drive);- NULL, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, NULL);+ nullptr, OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, nullptr);{- if (!ReadFile(hDisc, buffer, m_blocksize, (LPDWORD)¬_used, NULL))+ if (!ReadFile(hDisc, buffer, m_blocksize, (LPDWORD)¬_used, nullptr)){{{- return 0;+ return nullptr;- if (!ReadFile(hDisc, lpSector, m_blocksize, (LPDWORD)&NotUsed, NULL))+ if (!ReadFile(hDisc, lpSector, m_blocksize, (LPDWORD)&NotUsed, nullptr))PanicAlertT("Disc Read Error");- if (!ReadFile(hDisc, out_ptr, (DWORD)(m_blocksize * num_blocks), (LPDWORD)&NotUsed, NULL))+ if (!ReadFile(hDisc, out_ptr, (DWORD)(m_blocksize * num_blocks), (LPDWORD)&NotUsed, nullptr)){PanicAlertT("Disc Read Error");{+ void GetBlock(u64 block_num, u8 *out_ptr) override;bool IsOK() {return hDisc != INVALID_HANDLE_VALUE;}- bool IsOK() {return file_ != 0;}+ bool IsOK() {return file_ != nullptr;}- u64 GetDataSize() const { return size; }- u64 GetRawSize() const { return size; }+ u64 GetDataSize() const override { return size; }+ u64 GetRawSize() const override { return size; }+ virtual bool ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8 *out_ptr) override;- return NULL;+ return nullptr;- u64 GetDataSize() const { return m_size; }- u64 GetRawSize() const { return m_size; }+ u64 GetDataSize() const override { return m_size; }+ u64 GetRawSize() const override { return m_size; }{- : m_pBuffer(NULL)+ : m_pBuffer(nullptr){- if (pReader != NULL)+ if (pReader != nullptr){- : m_pBuffer(NULL)+ : m_pBuffer(nullptr){- if (pReader != NULL)+ if (pReader != nullptr){- : m_pBuffer(NULL)+ : m_pBuffer(nullptr){- if (pFileInfo != NULL)+ if (pFileInfo != nullptr){- if (pFileInfo == NULL)+ if (pFileInfo == nullptr){- if (pFileInfo == NULL)+ if (pFileInfo == nullptr){- BuildFilenames(1, m_FileInfoVector.size(), NULL, szNameTable);+ BuildFilenames(1, m_FileInfoVector.size(), nullptr, szNameTable);{- if (_szDirectory != NULL)+ if (_szDirectory != nullptr){{- if (_szDirectory != NULL)+ if (_szDirectory != nullptr){- return(NULL);+ return(nullptr);{{- SplitPath(filename, NULL, NULL, &extension);+ SplitPath(filename, nullptr, nullptr, &extension);std::unordered_set<std::string> extensions = {{- if (OpenISO != NULL)+ if (OpenISO != nullptr){- OpenISO = NULL;+ OpenISO = nullptr;- if (pFileSystem != NULL)+ if (pFileSystem != nullptr){- pFileSystem = NULL;+ pFileSystem = nullptr;{- if (OpenISO != NULL)+ if (OpenISO != nullptr){- OpenISO = NULL;+ OpenISO = nullptr;- if (pFileSystem != NULL)+ if (pFileSystem != nullptr){- pFileSystem = NULL;+ pFileSystem = nullptr;- if (pFileInfo != NULL && !pFileInfo->IsDirectory())+ if (pFileInfo != nullptr && !pFileInfo->IsDirectory())- return 0;+ return nullptr;- if (pFileInfo == NULL)+ if (pFileInfo == nullptr)- return NULL;+ return nullptr;- BuildFilenames(1, m_FileInfoVector.size(), NULL, NameTableOffset);+ BuildFilenames(1, m_FileInfoVector.size(), nullptr, NameTableOffset);{- if (_szDirectory != NULL)+ if (_szDirectory != nullptr){- if (_szDirectory != NULL)+ if (_szDirectory != nullptr)- virtual bool IsValid() const { return m_Valid; }+ virtual bool IsValid() const override { return m_Valid; }- return 0;+ return nullptr;{- pFileSystem = NULL;+ pFileSystem = nullptr;- , m_TIK(NULL)+ , m_TIK(nullptr){{- m_TIK = NULL;+ m_TIK = nullptr;- return NULL;+ return nullptr;- rContent.m_pData = NULL;+ rContent.m_pData = nullptr;{{{{{- if (pVolume == NULL)+ if (pVolume == nullptr){- SplitPath(_rFilename, NULL, &Filename, &ext);+ SplitPath(_rFilename, nullptr, &Filename, &ext);- return NULL;+ return nullptr;- return NULL;+ return nullptr;- return NULL;+ return nullptr;- return NULL;+ return nullptr;- for (u32 x = 0; x < 4; x++)+ for (SPartitionGroup& group : PartitionGroup){{- PartitionGroup[x].PartitionsVec.push_back(Partition);+ group.PartitionsVec.push_back(Partition);- return NULL;+ return nullptr;- , m_FSTData(NULL)+ , m_FSTData(nullptr)- , m_apploader(NULL)+ , m_apploader(nullptr)- , m_DOL(NULL)+ , m_DOL(nullptr){{- m_FSTData = NULL;+ m_FSTData = nullptr;- m_diskHeader = NULL;+ m_diskHeader = nullptr;- m_diskHeaderInfo = NULL;+ m_diskHeaderInfo = nullptr;- m_DOL = NULL;+ m_DOL = nullptr;- m_apploader = NULL;+ m_apploader = nullptr;- if(reader == NULL)+ if(reader == nullptr)+ std::string GetUniqueID() const override;+ std::string GetMakerID() const override;+ std::vector<std::string> GetNames() const override;+ u32 GetFSTSize() const override;+ std::string GetApploaderDate() const override;+ ECountry GetCountry() const override;{- m_pReader = NULL; // I don't think this makes any difference, but anyway+ m_pReader = nullptr; // I don't think this makes any difference, but anyway{- if (m_pReader == NULL)+ if (m_pReader == nullptr){static const std::string NO_UID("NO_UID");- if (m_pReader == NULL)+ if (m_pReader == nullptr){- if (m_pReader == NULL)+ if (m_pReader == nullptr)char name[0x60 + 1] = {};- if (m_pReader != NULL && Read(0x20, 0x60, (u8*)name))+ if (m_pReader != nullptr && Read(0x20, 0x60, (u8*)name)){- if (m_pReader == NULL)+ if (m_pReader == nullptr){- if (m_pReader == NULL)+ if (m_pReader == nullptr){- if (m_pReader == NULL)+ if (m_pReader == nullptr)- bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const { return false; }- u32 GetFSTSize() const { return 0; }- std::string GetApploaderDate() const { return "0"; }+ bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const override { return false; }+ u32 GetFSTSize() const override { return 0; }+ std::string GetApploaderDate() const override { return "0"; }- m_pBuffer(0),+ m_pBuffer(nullptr),{- m_pReader = NULL;+ m_pReader = nullptr;- m_pBuffer = NULL;+ m_pBuffer = nullptr;- m_AES_ctx = NULL;+ m_AES_ctx = nullptr;{- if (m_pReader == NULL)+ if (m_pReader == nullptr){{- if (m_pReader == NULL)+ if (m_pReader == nullptr){{- if (m_pReader == NULL)+ if (m_pReader == nullptr){char name[0xFF] = {};- if (m_pReader != NULL && Read(0x20, 0x60, (u8*)&name))+ if (m_pReader != nullptr && Read(0x20, 0x60, (u8*)&name)){- if (m_pReader == NULL)+ if (m_pReader == nullptr){{- if (m_pReader == NULL)+ if (m_pReader == nullptr){- bool SupportsIntegrityCheck() const { return true; }+ bool SupportsIntegrityCheck() const override { return true; }- : m_total_files(0), m_size(0), m_wlba_table(0), m_good(true)+ : m_total_files(0), m_size(0), m_wlba_table(nullptr), m_good(true){{{- return NULL;+ return nullptr;- u64 GetDataSize() const { return m_size; }- u64 GetRawSize() const { return m_size; }+ u64 GetDataSize() const override { return m_size; }+ u64 GetRawSize() const override { return m_size; }{- if (pReader == NULL || File::IsDirectory(_rName))+ if (pReader == nullptr || File::IsDirectory(_rName)){{- _dbg_assert_msg_(BOOT, pTmpBuffer!=0, "WiiWAD: Cant allocate memory for WAD entry");+ _dbg_assert_msg_(BOOT, pTmpBuffer!=nullptr, "WiiWAD: Cant allocate memory for WAD entry");{- return NULL;+ return nullptr;{- if (pReader == NULL)+ if (pReader == nullptr){{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);- for (size_t j = 0; j < code.ops.size(); j++)+ for (const AREntry& entry : code.ops){- sprintf(ops, "%08x %08x", code.ops[j].cmd_addr, code.ops[j].value);+ sprintf(ops, "%08x %08x", entry.cmd_addr, entry.value);{- for (size_t i = 0; i < indexList.size(); i++)+ for (const ARCodeIndex& code_index : indexList){- if ((int)indexList[i].uiIndex == index)+ if ((int)code_index.uiIndex == index){- ActionReplay::SetARCode_IsActive(m_CheckListBox_CheatsList->IsChecked(index), indexList[i].index);+ ActionReplay::SetARCode_IsActive(m_CheckListBox_CheatsList->IsChecked(index), code_index.index);{- for (size_t i = 0; i < indexList.size(); i++)+ for (const ARCodeIndex& code_index : indexList){- ActionReplay::SetARCode_IsActive(m_CheckListBox_CheatsList->IsChecked(indexList[i].uiIndex), indexList[i].index);+ ActionReplay::SetARCode_IsActive(m_CheckListBox_CheatsList->IsChecked(code_index.uiIndex), code_index.index);{{- m_TextCtrl_Log->AppendText(StrToWxStr(arLog[i]));+ m_TextCtrl_Log->AppendText(StrToWxStr(text));{- if (NULL == memptr)+ if (nullptr == memptr){PanicAlertT("A game is not currently running.");{- if (NULL == memptr)+ if (nullptr == memptr){PanicAlertT("A game is not currently running.");{- for (; i!=e; ++i)+ for (CheatSearchResult& result : search_results){- int cmp_result = memcmp(memptr + i->address, &i->old_value, search_type_size);+ int cmp_result = memcmp(memptr + result.address, &result.old_value, search_type_size);{- for (; i!=e; ++i)+ for (CheatSearchResult& result : search_results){- int cmp_result = memcmp(memptr + i->address, &user_x_val, search_type_size);+ int cmp_result = memcmp(memptr + result.address, &user_x_val, search_type_size);{{- SplitPath(filename, NULL, &name, &ext);+ SplitPath(filename, nullptr, &name, &ext);+ void Update() override;{- bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != 0;+ bool isSymbol = symbol_db->GetSymbolFromAddr(selection) != nullptr;{- mojs = 0;+ mojs = nullptr;{- wxDefaultPosition, wxSize(90, 100), 0, NULL, wxLB_SORT), 1, wxEXPAND);+ wxDefaultPosition, wxSize(90, 100), 0, nullptr, wxLB_SORT), 1, wxEXPAND);- wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);+ wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);- wxSize(90, 100), 0, NULL, wxLB_SORT), 0, wxEXPAND);+ wxSize(90, 100), 0, nullptr, wxLB_SORT), 0, wxEXPAND);+ void Update() override;{- if (jit != NULL)+ if (jit != nullptr){- if (jit != NULL)+ if (jit != nullptr){- wxFileType* filetype = NULL;+ wxFileType* filetype = nullptr;if (!(filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_T("txt")))){if (index >= 0) {- if (pSymbol != NULL)+ if (pSymbol != nullptr){{{- m_RegisterWindow = NULL;+ m_RegisterWindow = nullptr;{- m_BreakpointWindow = NULL;+ m_BreakpointWindow = nullptr;{- m_MemoryWindow = NULL;+ m_MemoryWindow = nullptr;{- m_JitWindow = NULL;+ m_JitWindow = nullptr;{- m_SoundWindow = NULL;+ m_SoundWindow = nullptr;{- m_VideoWindow = NULL;+ m_VideoWindow = nullptr;-DSPDebuggerLLE* m_DebuggerFrame = NULL;+DSPDebuggerLLE* m_DebuggerFrame = nullptr;- wxSize(140, 100), 0, NULL, wxLB_SORT);+ wxSize(140, 100), 0, nullptr, wxLB_SORT);{- m_DebuggerFrame = NULL;+ m_DebuggerFrame = nullptr;{- if (g_dsp.dram == NULL)+ if (g_dsp.dram == nullptr)if (index >= 0) {- if (pSymbol != NULL)+ if (pSymbol != nullptr){{+ void Update() override;- int GetNumberCols(void) {return 2;}- int GetNumberRows(void) {return 32;}- bool IsEmptyCell(int row, int col) {return false;}+ int GetNumberCols(void) override {return 2;}+ int GetNumberRows(void) override {return 32;}+ bool IsEmptyCell(int row, int col) override {return false;}{+ void Update() override;{- g_pdebugger = NULL;+ g_pdebugger = nullptr;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"));{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"));+ void OnPause() override;+ void OnContinue() override;+ void Update() override;const wxString& name = _("JIT block viewer"));+ void Update() override;- dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&hFont);+ dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&hFont);- dc.GetTextExtent(_T("0WJyq"),&w,&h,NULL,NULL,&DebuggerFont);+ dc.GetTextExtent(_T("0WJyq"),&w,&h,nullptr,nullptr,&DebuggerFont);- // wxSize(20, 100), 0, NULL, wxLB_SORT);+ // wxSize(20, 100), 0, nullptr, wxLB_SORT);{- if (pSymbol != NULL)+ if (pSymbol != nullptr){{- u8* TheRAM = 0;+ u8* TheRAM = nullptr;{char copy[3] = {0};{+ void Update() override;- int GetNumberCols(void) {return 5;}- int GetNumberRows(void) {return 32 + NUM_SPECIALS;}- bool IsEmptyCell(int row, int col) {return row > 31 && col > 2;}+ int GetNumberCols(void) override {return 5;}+ int GetNumberRows(void) override {return 32 + NUM_SPECIALS;}+ bool IsEmptyCell(int row, int col) override {return row > 31 && col > 2;}{+ void Update() override;- , m_GPRGridView(NULL)+ , m_GPRGridView(nullptr){{- if (m_GPRGridView != NULL)+ if (m_GPRGridView != nullptr)-wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = NULL;+wxEvtHandler *volatile FifoPlayerDlg::m_EvtHandler = nullptr;wxDialog(parent, wxID_ANY, _("FIFO Player")),- FifoPlayer::GetInstance().SetFrameWrittenCallback(NULL);+ FifoPlayer::GetInstance().SetFrameWrittenCallback(nullptr);- m_EvtHandler = NULL;+ m_EvtHandler = nullptr;{- return (FifoRecorder::GetInstance().GetRecordedFile() != NULL);+ return (FifoRecorder::GetInstance().GetRecordedFile() != nullptr);- Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CRenderFrame::OnDropFiles), NULL, this);+ Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CRenderFrame::OnDropFiles), nullptr, this);{- if (m_RenderFrame != NULL)+ if (m_RenderFrame != nullptr){{- m_LogWindow = NULL;+ m_LogWindow = nullptr;- if (GetStatusBar() != NULL)+ if (GetStatusBar() != nullptr)- if (m_RenderFrame != NULL)+ if (m_RenderFrame != nullptr){- if (m_RenderParent == NULL)+ if (m_RenderParent == nullptr)- if (wxWindow::FindFocus() == NULL)+ if (wxWindow::FindFocus() == nullptr)- void UpdateWiiMenuChoice(wxMenuItem *WiiMenuItem=NULL);+ void UpdateWiiMenuChoice(wxMenuItem *WiiMenuItem=nullptr);const wxString& title = wxT(""),- wxWindow * = NULL);+ wxWindow * = nullptr);{- m_LogConfigWindow = NULL;+ m_LogConfigWindow = nullptr;{- wxAuiNotebook * NB = NULL;+ wxAuiNotebook * NB = nullptr;{- return NULL;+ return nullptr;- return NULL;+ return nullptr;- if (m_ToolBar != NULL)+ if (m_ToolBar != nullptr){- if (m_GameListCtrl->GetSelectedISO() != NULL)+ if (m_GameListCtrl->GetSelectedISO() != nullptr){{- ChangeDisplaySettings(NULL, CDS_FULLSCREEN);+ ChangeDisplaySettings(nullptr, CDS_FULLSCREEN);- m_RenderParent = NULL;+ m_RenderParent = nullptr;- m_RenderParent != NULL)+ m_RenderParent != nullptr){- m_RenderParent = NULL;+ m_RenderParent = nullptr;GetStatusBar()->SetStatusText(wxT(" "), 0);{{- if (NetPlayDiag::GetInstance() != NULL)+ if (NetPlayDiag::GetInstance() != nullptr)- if (m_GameListCtrl->GetSelectedISO() != NULL && m_GameListCtrl->IsEnabled())+ if (m_GameListCtrl->GetSelectedISO() != nullptr && m_GameListCtrl->IsEnabled()){- EGLConfig *config = NULL;+ EGLConfig *config = nullptr;- if (!eglChooseConfig( GLWin.egl_dpy, attribs, NULL, 0, &num_configs))+ if (!eglChooseConfig( GLWin.egl_dpy, attribs, nullptr, 0, &num_configs)){- GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, NULL);+ GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, nullptr);{- GLWin.egl_ctx = NULL;+ GLWin.egl_ctx = nullptr;-PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL;+PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = nullptr;- if (GLWin.vi == NULL)+ if (GLWin.vi == nullptr){- if (GLWin.vi != NULL)+ if (GLWin.vi != nullptr){{- if (GLWin.vi == NULL)+ if (GLWin.vi == nullptr){- GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, 0, GL_TRUE);+ GLWin.ctx = glXCreateContext(GLWin.dpy, GLWin.vi, nullptr, GL_TRUE);{PanicAlert("Unable to create GLX context.");{- return glXMakeCurrent(GLWin.dpy, None, NULL);+ return glXMakeCurrent(GLWin.dpy, None, nullptr);- GLWin.ctx = NULL;+ GLWin.ctx = nullptr;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; }- platform_env = NULL;+ platform_env = nullptr;- return NULL;+ return nullptr;-static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = NULL;+static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = nullptr;{{- if (func == NULL)+ if (func == nullptr)- return func;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");{- bool success = wglMakeCurrent(hDC, NULL) ? true : false;+ bool success = wglMakeCurrent(hDC, nullptr) ? true : false;{{{- if (!wglMakeCurrent(NULL, NULL))+ if (!wglMakeCurrent(nullptr, nullptr))- hRC = NULL;+ hRC = nullptr;{- hDC = NULL;+ hDC = nullptr;- GLWin.pointer.serial, NULL, 0, 0);+ GLWin.pointer.serial, nullptr, 0, 0);if (fullscreen) {- 0, NULL);+ 0, nullptr);} else {- handle_configure(NULL, GLWin.wl_shell_surface, 0,+ handle_configure(nullptr, GLWin.wl_shell_surface, 0,- 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) {if (!GLWin.keyboard.xkb.state) {- GLWin.keyboard.xkb.keymap = NULL;+ GLWin.keyboard.xkb.keymap = nullptr;{if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wl_pointer) {} else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wl_pointer) {- wl_pointer = NULL;+ wl_pointer = nullptr;} else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && wl_keyboard) {- wl_keyboard = NULL;+ wl_keyboard = nullptr;} else if (strcmp(interface, "wl_shm") == 0) {- 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_display = wl_display_connect(NULL);+ GLWin.wl_display = wl_display_connect(nullptr);- if (GLWin.keyboard.xkb.context == NULL) {+ if (GLWin.keyboard.xkb.context == nullptr) {- return NULL;+ return nullptr;- ®istry_listener, NULL);+ ®istry_listener, nullptr);{- GLWin.dpy = XOpenDisplay(NULL);+ GLWin.dpy = XOpenDisplay(nullptr);- GLWin.evdpy = XOpenDisplay(NULL);+ GLWin.evdpy = XOpenDisplay(nullptr);- XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, NULL, 0, NULL);+ XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, nullptr, 0, nullptr);- XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, NULL, 0, NULL);+ XSetStandardProperties(GLWin.evdpy, GLWin.win, "GPU", "GPU", None, nullptr, 0, nullptr);- : wxListCtrl(parent, id, pos, size, style), toolTip(0)+ : wxListCtrl(parent, id, pos, size, style), toolTip(nullptr){- Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CGameListCtrl::OnDropFiles), NULL, this);+ Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(CGameListCtrl::OnDropFiles), nullptr, this);{- m_imageListSmall = NULL;+ m_imageListSmall = nullptr;- if (GetSelectedISO() == NULL)+ if (GetSelectedISO() == nullptr){- SplitPath(rFilenames[i], NULL, &FileName, NULL);+ SplitPath(rFilenames[i], nullptr, &FileName, nullptr);dialog.Update(i, wxString::Format(_("Scanning %s"),- return NULL;+ return nullptr;{{- return NULL;+ return nullptr;{- return NULL;+ return nullptr;{{- return NULL;+ return nullptr;{{- SplitPath(iso->GetFileName(), NULL, &FileName, &FileExt);+ SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);FileName.append(".gcz");{- SplitPath(iso->GetFileName(), NULL, &FileName, &FileExt);+ SplitPath(iso->GetFileName(), nullptr, &FileName, &FileExt);FileName.append(".iso");+ void Update() override;- (wxObject*) NULL \+ (wxObject*) nullptr \- ClickedButton = NULL;+ ClickedButton = nullptr;- ClickedButton = NULL;+ ClickedButton = nullptr;{- if(ClickedButton != NULL)+ if(ClickedButton != nullptr){{- if (pVolume != NULL)+ if (pVolume != nullptr){- if (pFileSystem != NULL || m_Platform == WII_WAD)+ if (pFileSystem != nullptr || m_Platform == WII_WAD){- if (pBannerLoader != NULL)+ if (pBannerLoader != nullptr){{{- SplitPath(GetFileName(), NULL, &name, NULL);+ SplitPath(GetFileName(), nullptr, &name, nullptr);- if (Iso == NULL)+ if (Iso == nullptr){- 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){- RootId = m_Treectrl->AddRoot(_("Disc"), 0, 0, 0);+ RootId = m_Treectrl->AddRoot(_("Disc"), 0, 0, nullptr);u32 index[2] = {0, 0};- DiscIO::IFileSystem *FS = 0;+ DiscIO::IFileSystem *FS = nullptr;{{- ExportDir(NULL, WxStrToStr(Path).c_str(), i);+ ExportDir(nullptr, WxStrToStr(Path).c_str(), i);- ExportDir(NULL, WxStrToStr(Path).c_str());+ ExportDir(nullptr, WxStrToStr(Path).c_str());{- DiscIO::IFileSystem *FS = NULL;+ DiscIO::IFileSystem *FS = nullptr;wxString Path = wxDirSelector(_("Choose the folder to extract to"));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!");- SplitPath(OpenGameListItem->GetFileName(), 0, &filename, &extension);+ SplitPath(OpenGameListItem->GetFileName(), nullptr, &filename, &extension);SetTitle(StrToWxStr(StringFromFormat("%s%s: %s - ", filename.c_str(),{{- static_bitmap = NULL;+ static_bitmap = nullptr;{- wxBoxSizer* stacked_groups = NULL;+ wxBoxSizer* stacked_groups = nullptr;{- if (col_size > 8 || NULL == stacked_groups)+ if (col_size > 8 || nullptr == stacked_groups){{, value(setting->value) {}{+ virtual bool Validate() override;{- 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);+ bool Destroy() override;{- if ( (*g)->static_bitmap )+ if (g->static_bitmap){- wxBitmap bitmap((*g)->static_bitmap->GetBitmap());+ wxBitmap bitmap(g->static_bitmap->GetBitmap());- dc.DrawText(StrToWxStr((*g)->control_group->name).Upper(), 4, 2);+ dc.DrawText(StrToWxStr(g->control_group->name).Upper(), 4, 2);- switch ( (*g)->control_group->type )+ switch (g->control_group->type){- switch ((*g)->control_group->type)+ switch (g->control_group->type){- ((ControllerEmu::AnalogStick*)(*g)->control_group)->GetState( &x, &y, 32.0, 32-1.5 );+ ((ControllerEmu::AnalogStick*)g->control_group)->GetState(&x, &y, 32.0, 32-1.5);- ((ControllerEmu::Tilt*)(*g)->control_group)->GetState( &x, &y, 32.0, 32-1.5 );+ ((ControllerEmu::Tilt*)g->control_group)->GetState(&x, &y, 32.0, 32-1.5);- ((ControllerEmu::Cursor*)(*g)->control_group)->GetState( &x, &y, &z );+ ((ControllerEmu::Cursor*)g->control_group)->GetState(&x, &y, &z);- if (GROUP_TYPE_CURSOR == (*g)->control_group->type)+ if (GROUP_TYPE_CURSOR == g->control_group->type){{- dc.DrawRectangle( 0, 31 - z*31, 64, 2);- if ( GROUP_TYPE_STICK == (*g)->control_group->type )+ if (GROUP_TYPE_STICK == g->control_group->type){wxBrush LightGrayBrush(_T("#dddddd"));- if (strcmp((*g)->control_group->name, "Main Stick") == 0)+ if (strcmp(g->control_group->name, "Main Stick") == 0){- else if (strcmp((*g)->control_group->name,"C-Stick") == 0)+ else if (strcmp(g->control_group->name,"C-Stick") == 0){{- dc.DrawRectangle( 16, 16, 32, 32 );+ dc.DrawRectangle(16, 16, 32, 32);- if ( GROUP_TYPE_CURSOR != (*g)->control_group->type )+ if (GROUP_TYPE_CURSOR != g->control_group->type){- dc.DrawCircle( 32, 32, ((*g)->control_group)->settings[SETTING_DEADZONE]->value * 32 );+ dc.DrawCircle(32, 32, g->control_group->settings[SETTING_DEADZONE]->value * 32);{- dc.DrawRectangle( x-2, 64-y-2, 4, 4 );+ dc.DrawRectangle(x-2, 64-y-2, 4, 4);{- const float deadzone = 32 * ((*g)->control_group)->settings[0]->value;+ const float deadzone = 32 * g->control_group->settings[0]->value;- ((ControllerEmu::Force*)(*g)->control_group)->GetState( adj_dot, 32.0, 32-1.5 );+ ((ControllerEmu::Force*)g->control_group)->GetState(adj_dot, 32.0, 32-1.5);- for ( unsigned int i=0; i<3; ++i )+ for (unsigned int i=0; i<3; ++i){- dc.DrawRectangle( 0, 32 - deadzone, 64, deadzone * 2 );+ dc.DrawRectangle(0, 32 - deadzone, 64, deadzone * 2);- dc.DrawRectangle( 0, raw_dot[2] - 1, 64, 2 );+ dc.DrawRectangle(0, raw_dot[2] - 1, 64, 2);- if ( adj_dot[2]!=32 )+ if (adj_dot[2]!=32){- dc.DrawRectangle( 0, adj_dot[2] - 1, 64, 2 );+ dc.DrawRectangle(0, adj_dot[2] - 1, 64, 2);- dc.DrawRectangle( 16, 16, 32, 32 );+ dc.DrawRectangle(16, 16, 32, 32);- dc.DrawRectangle( 32 - deadzone, 32 - deadzone, deadzone * 2, deadzone * 2 );+ dc.DrawRectangle(32 - deadzone, 32 - deadzone, deadzone * 2, deadzone * 2);- dc.DrawRectangle( raw_dot[1] - 2, raw_dot[0] - 2, 4, 4 );+ dc.DrawRectangle(raw_dot[1] - 2, raw_dot[0] - 2, 4, 4);- if ( adj_dot[1]!=32 || adj_dot[0]!=32 )+ if (adj_dot[1]!=32 || adj_dot[0]!=32){- dc.DrawRectangle( adj_dot[1]-2, adj_dot[0]-2, 4, 4 );+ dc.DrawRectangle(adj_dot[1]-2, adj_dot[0]-2, 4, 4);{- const unsigned int button_count = ((unsigned int)(*g)->control_group->controls.size());+ const unsigned int button_count = ((unsigned int)g->control_group->controls.size());- ((ControllerEmu::Buttons*)(*g)->control_group)->GetState( &buttons, bitmasks );+ ((ControllerEmu::Buttons*)g->control_group)->GetState(&buttons, bitmasks);{- if ( buttons & bitmasks[n] )+ if (buttons & bitmasks[n]){- dc.SetBrush( *wxRED_BRUSH );+ dc.SetBrush(*wxRED_BRUSH);{- unsigned char amt = 255 - (*g)->control_group->controls[n]->control_ref->State() * 128;+ unsigned char amt = 255 - g->control_group->controls[n]->control_ref->State() * 128;- const char* const name = (*g)->control_group->controls[n]->name;+ const char* const name = g->control_group->controls[n]->name;{- const unsigned int trigger_count = ((unsigned int)((*g)->control_group->controls.size()));+ const unsigned int trigger_count = ((unsigned int)(g->control_group->controls.size()));- ControlState deadzone = (*g)->control_group->settings[0]->value;+ ControlState deadzone = g->control_group->settings[0]->value;- ((ControllerEmu::Triggers*)(*g)->control_group)->GetState( trigs, 64 );+ ((ControllerEmu::Triggers*)g->control_group)->GetState(trigs, 64);- for ( unsigned int n = 0; n < trigger_count; ++n )+ for (unsigned int n = 0; n < trigger_count; ++n){- ControlState trig_r = (*g)->control_group->controls[n]->control_ref->State();+ ControlState trig_r = g->control_group->controls[n]->control_ref->State();- dc.DrawText(StrToWxStr((*g)->control_group->controls[n]->name), 3, n*12 + 1);+ dc.DrawText(StrToWxStr(g->control_group->controls[n]->name), 3, n*12 + 1);{- const unsigned int trigger_count = ((unsigned int)((*g)->control_group->controls.size() / 2));+ const unsigned int trigger_count = ((unsigned int)(g->control_group->controls.size() / 2));- ControlState thresh = (*g)->control_group->settings[0]->value;+ ControlState thresh = g->control_group->settings[0]->value;- for ( unsigned int n = 0; n < trigger_count; ++n )+ for (unsigned int n = 0; n < trigger_count; ++n){- ControlState trig_d = (*g)->control_group->controls[n]->control_ref->State();+ ControlState trig_d = g->control_group->controls[n]->control_ref->State();- : (*g)->control_group->controls[n+trigger_count]->control_ref->State();+ : g->control_group->controls[n+trigger_count]->control_ref->State();- if ( trig_d <= thresh )+ if (trig_d <= thresh){- const ControlState deadzone = (*g)->control_group->settings[0]->value;+ const ControlState deadzone = g->control_group->settings[0]->value;- ControlState state = (*g)->control_group->controls[1]->control_ref->State() - (*g)->control_group->controls[0]->control_ref->State();+ ControlState state = g->control_group->controls[1]->control_ref->State() - g->control_group->controls[0]->control_ref->State();- ((ControllerEmu::Slider*)(*g)->control_group)->GetState(&state, 1);+ ((ControllerEmu::Slider*)g->control_group)->GetState(&state, 1);{- (*g)->static_bitmap->SetBitmap(bitmap);+ g->static_bitmap->SetBitmap(bitmap);m_writeWindowCB = new wxCheckBox(this, wxID_ANY, _("Write to Window"));- m_writeDebuggerCB = NULL;+ m_writeDebuggerCB = nullptr;{- , m_Log(NULL), m_cmdline(NULL), m_FontChoice(NULL)+ , m_Log(nullptr), m_cmdline(nullptr), m_FontChoice(nullptr){+ void Log(LogTypes::LOG_LEVELS, const char *text) override;-CFrame* main_frame = NULL;+CFrame* main_frame = nullptr;{- wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0+ wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0if (File::Exists("www.dolphin-emulator.com.txt")){File::Delete("www.dolphin-emulator.com.txt");- MessageBox(NULL,+ MessageBox(nullptr,- 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);- main_frame = new CFrame((wxFrame*)NULL, wxID_ANY,+ main_frame = new CFrame((wxFrame*)nullptr, wxID_ANY,- if (m_afterinit == NULL)+ if (m_afterinit == nullptr){- m_afterinit = NULL;+ m_afterinit = nullptr;{- return NULL;+ return nullptr;-void* Host_GetInstance() { return NULL; }+void* Host_GetInstance() { return nullptr; }{{- if (pVolume != NULL)+ if (pVolume != nullptr){- if (pFileSystem != NULL || bIsWad)+ if (pFileSystem != nullptr || bIsWad){- if (pBannerLoader != NULL)+ if (pBannerLoader != nullptr){- SplitPath(filename, NULL, &name, NULL);+ SplitPath(filename, nullptr, &name, nullptr);{- const char *Device = env->GetStringUTFChars(jDevice, NULL);+ const char *Device = env->GetStringUTFChars(jDevice, nullptr);{- const char *Device = env->GetStringUTFChars(jDevice, NULL);+ const char *Device = env->GetStringUTFChars(jDevice, nullptr);{- const char *File = env->GetStringUTFChars(jFile, NULL);+ const char *File = env->GetStringUTFChars(jFile, nullptr);{- const char *File = env->GetStringUTFChars(jFile, NULL);+ const char *File = env->GetStringUTFChars(jFile, nullptr);{{{- const char *File = env->GetStringUTFChars(jFile, NULL);+ const char *File = env->GetStringUTFChars(jFile, nullptr);{- return NULL;+ return nullptr;-void* Host_GetInstance() { return NULL; }+void* Host_GetInstance() { return nullptr; }void Host_UpdateTitle(const char* title){};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 }- GLWin.wl_display = NULL;+ GLWin.wl_display = nullptr;{{- memoryCard[SLOT_A] = NULL;+ memoryCard[SLOT_A] = nullptr;{- memoryCard[SLOT_B] = NULL;+ memoryCard[SLOT_B] = nullptr;{- memoryCard[slot] = NULL;+ memoryCard[slot] = nullptr;{- SplitPath(mpath, &path1, &path2, NULL);+ SplitPath(mpath, &path1, &path2, nullptr);if(PanicYesNoT("Warning: This will overwrite any existing saves that are in the folder:\n"{- CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, NULL, path1), -1);+ CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, nullptr, path1), -1);-NetPlayDiag *NetPlayDiag::npd = NULL;+NetPlayDiag *NetPlayDiag::npd = nullptr;{netplay_section.Set("HostPort", WxStrToStr(m_host_port_text->GetValue()));- main_frame->g_NetPlaySetupDiag = NULL;+ main_frame->g_NetPlaySetupDiag = nullptr;- , m_start_btn(NULL)+ , m_start_btn(nullptr){{- netplay_client = NULL;+ netplay_client = nullptr;{- netplay_server = NULL;+ netplay_server = nullptr;- npd = NULL;+ npd = nullptr;{- if (netplay_client != NULL)+ if (netplay_client != nullptr)static NetPlayDiag *&GetInstance() { return npd; };+ bool IsRecording() override;- else if (wxWindow::FindFocus() != NULL &&+ else if (wxWindow::FindFocus() != nullptr &&- while (EnumDisplaySettings(NULL, iModeNum++, &dmi) != 0)+ while (EnumDisplaySettings(nullptr, iModeNum++, &dmi) != 0){- CFArrayRef modes = CGDisplayCopyAllDisplayModes(CGMainDisplayID(), NULL);+ CFArrayRef modes = CGDisplayCopyAllDisplayModes(CGMainDisplayID(), nullptr);{{- 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);- 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);- NULL};+ nullptr};- if (!posix_spawnp(&pid, "xdg-screensaver", NULL, NULL, argv, environ))+ if (!posix_spawnp(&pid, "xdg-screensaver", nullptr, nullptr, argv, environ)){- , screenResources(NULL), outputInfo(NULL), crtcInfo(NULL)+ , screenResources(nullptr), outputInfo(nullptr), crtcInfo(nullptr){- outputInfo = NULL;+ outputInfo = nullptr;{- crtcInfo = NULL;+ crtcInfo = nullptr;- char *output_name = NULL;+ char *output_name = nullptr;if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') =={{- ref->parsed_expression = NULL;+ ref->parsed_expression = nullptr;-// else return NULL+// else return nullptr{- return NULL;+ return nullptr;- return NULL;+ return nullptr;- return NULL;+ return nullptr;- ControlReference(const bool _is_input) : range(1), is_input(_is_input), parsed_expression(NULL) {}+ ControlReference(const bool _is_input) : range(1), is_input(_is_input), parsed_expression(nullptr) {}{InputReference() : ControlReference(true) {}{OutputReference() : ControlReference(false) {}- ControllerInterface() : m_is_init(false), m_hwnd(NULL) {}+ ControllerInterface() : m_is_init(false), m_hwnd(nullptr) {}{- if (FAILED(DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, NULL)))+ if (FAILED(DirectInput8Create(GetModuleHandle(nullptr), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&idi8, nullptr))){-#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }+#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=nullptr; } }IWbemClassObject* pDevices[20] = {0};- hr = CoInitialize(NULL);+ hr = CoInitialize(nullptr);- NULL,+ nullptr,- if (FAILED(hr) || pIWbemLocator == NULL)+ if (FAILED(hr) || pIWbemLocator == nullptr){{- if (SUCCEEDED(idi8->CreateDevice(joystick.guidInstance, &js_device, NULL)))+ if (SUCCEEDED(idi8->CreateDevice(joystick.guidInstance, &js_device, nullptr))){{{//PanicAlert("SetCooperativeLevel(DISCL_EXCLUSIVE) failed!");- if (FAILED(js_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))+ if (FAILED(js_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))){//PanicAlert("SetCooperativeLevel failed!");- if (SUCCEEDED(idi8->CreateDevice( GUID_SysKeyboard, &kb_device, NULL)))+ if (SUCCEEDED(idi8->CreateDevice( GUID_SysKeyboard, &kb_device, nullptr))){{- if (SUCCEEDED(kb_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))+ if (SUCCEEDED(kb_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))){- if (SUCCEEDED(idi8->CreateDevice( GUID_SysMouse, &mo_device, NULL )))+ if (SUCCEEDED(idi8->CreateDevice( GUID_SysMouse, &mo_device, nullptr ))){{- if (SUCCEEDED(mo_device->SetCooperativeLevel(NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE)))+ if (SUCCEEDED(mo_device->SetCooperativeLevel(nullptr, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE))){- return NULL;+ return nullptr;- return NULL;+ return nullptr;- return NULL;+ return nullptr;- return NULL;+ return nullptr;virtual ~Control() {}- virtual Input* ToInput() { return NULL; }- virtual Output* ToOutput() { return NULL; }+ virtual Input* ToInput() { return nullptr; }+ virtual Output* ToOutput() { return nullptr; }- Input* ToInput() { return this; }+ Input* ToInput() override { return this; }- Output* ToOutput() { return this; }+ Output* ToOutput() override { return this; }{}+ ControlState GetState() const override{+ std::string GetName() const override{{- return NULL;+ return nullptr;{- if (control == NULL)+ if (control == nullptr){- *expr_out = NULL;+ *expr_out = nullptr;{- Expression() : node(NULL) {}+ Expression() : node(nullptr) {}- if (SUCCEEDED(device->CreateEffect(f.guid, &eff, &pEffect, NULL)))+ if (SUCCEEDED(device->CreateEffect(f.guid, &eff, &pEffect, nullptr))){- state.params = NULL;+ state.params = nullptr;{{- EffectState(LPDIRECTINPUTEFFECT eff) : iface(eff), params(NULL), size(0) {}+ EffectState(LPDIRECTINPUTEFFECT eff) : iface(eff), params(nullptr), size(0) {}{- *ppv = NULL;+ *ppv = nullptr;- if (NULL == *ppv)+ if (nullptr == *ppv){-static IOHIDManagerRef HIDManager = NULL;+static IOHIDManagerRef HIDManager = nullptr;static CFStringRef OurRunLoop = CFSTR("DolphinOSXInput");- IOHIDElementGetName(e), // usually just NULL+ IOHIDElementGetName(e), // usually just nullptrCFRange range = {0, CFArrayGetCount(elements)};- DeviceElementDebugPrint, NULL);+ DeviceElementDebugPrint, nullptr);{- std::string name = (pName != NULL) ? [pName UTF8String] : "Unknown device";+ std::string name = (pName != nullptr) ? [pName UTF8String] : "Unknown device";- IOHIDManagerSetDeviceMatching(HIDManager, NULL);+ IOHIDManagerSetDeviceMatching(HIDManager, nullptr);- IOHIDManagerRegisterDeviceMatchingCallback(HIDManager, NULL, NULL);+ IOHIDManagerRegisterDeviceMatchingCallback(HIDManager, nullptr, nullptr);{- //DeviceElementDebugPrint(e, NULL);+ //DeviceElementDebugPrint(e, nullptr);{- //DeviceElementDebugPrint(e, NULL);+ //DeviceElementDebugPrint(e, nullptr);if (IOHIDElementGetUsage(e) == kHIDUsage_GD_Hatswitch) {{- //DeviceElementDebugPrint(e, NULL);+ //DeviceElementDebugPrint(e, nullptr);{uint32_t windowid[1] = { m_windowid };- CFArrayRef windowArray = CFArrayCreate(NULL, (const void **) windowid, 1, NULL);+ CFArrayRef windowArray = CFArrayCreate(nullptr, (const void **) windowid, 1, nullptr);{- if (boundsDictionary != NULL)+ if (boundsDictionary != nullptr){+ std::string GetName() const override;ConstantEffect(EffectIDState& effect) : m_effect(effect) {}+ void SetState(ControlState state) override;{+ std::string GetName() const override;RampEffect(EffectIDState& effect) : m_effect(effect) {}+ void SetState(ControlState state) override;{+ std::string GetName() const override;SineEffect(EffectIDState& effect) : m_effect(effect) {}+ void SetState(ControlState state) override;{+ std::string GetName() const override;TriangleEffect(EffectIDState& effect) : m_effect(effect) {}+ void SetState(ControlState state) override;{- Display* dpy = XOpenDisplay(NULL);+ Display* dpy = XOpenDisplay(nullptr);- m_display = XOpenDisplay(NULL);+ m_display = XOpenDisplay(nullptr);- XKeysymToString(keysym) == NULL)+ XKeysymToString(keysym) == nullptr){- std::string GetName() const { return m_keyname; }+ std::string GetName() const override { return m_keyname; }+ ControlState GetState() const override;{- std::string GetName() const { return name; }+ std::string GetName() const override { return name; }+ ControlState GetState() const override;{- std::string GetName() const { return name; }- bool IsDetectable() { return false; }+ std::string GetName() const override { return name; }+ bool IsDetectable() override { return false; }+ ControlState GetState() const override;{- std::string GetName() const { return name; }- bool IsDetectable() { return false; }+ std::string GetName() const override { return name; }+ bool IsDetectable() override { return false; }+ ControlState GetState() const override;{- m_display = XOpenDisplay(NULL);+ m_display = XOpenDisplay(nullptr);- XKeysymToString(keysym) == NULL)+ XKeysymToString(keysym) == nullptr){+ std::string GetName() const override;+ ControlState GetState() const override;{+ std::string GetName() const override;: m_buttons(buttons), m_index(index) {}+ ControlState GetState() const override;{- bool IsDetectable() { return false; }+ bool IsDetectable() override { return false; }: m_cursor(cursor), m_index(index), m_positive(positive) {}+ ControlState GetState() const override;{- srand((unsigned int)time(0));+ srand((unsigned int)time(nullptr));- if ((rv = getaddrinfo(NULL, _port, &hints, &servinfo)) != 0)+ if ((rv = getaddrinfo(nullptr, _port, &hints, &servinfo)) != 0){- for(p = servinfo; p != NULL; p = p->ai_next)+ for(p = servinfo; p != nullptr; p = p->ai_next){- int rt=select(maxfd,&fds,NULL,NULL,&timeout);+ int rt=select(maxfd,&fds,nullptr,nullptr,&timeout);- inst(NULL), index(indx),+ inst(nullptr), index(indx),{- bool udpAEn=(inst!=NULL);+ bool udpAEn=(inst!=nullptr);{{- inst = NULL;+ inst = nullptr;{{-D3DTexture2D* backbuf = NULL;+D3DTexture2D* backbuf = nullptr;hDXGIDll = LoadLibraryA("dxgi.dll");{- MessageBoxA(NULL, "Failed to load dxgi.dll", "Critical error", MB_OK | MB_ICONERROR);+ MessageBoxA(nullptr, "Failed to load dxgi.dll", "Critical error", MB_OK | MB_ICONERROR);- if (PCreateDXGIFactory == NULL) MessageBoxA(NULL, "GetProcAddress failed for CreateDXGIFactory!", "Critical error", MB_OK | MB_ICONERROR);+ if (PCreateDXGIFactory == nullptr) MessageBoxA(nullptr, "GetProcAddress failed for CreateDXGIFactory!", "Critical error", MB_OK | MB_ICONERROR);hD3DDll = LoadLibraryA("d3d11.dll");{- MessageBoxA(NULL, "Failed to load d3d11.dll", "Critical error", MB_OK | MB_ICONERROR);+ MessageBoxA(nullptr, "Failed to load d3d11.dll", "Critical error", MB_OK | MB_ICONERROR);- if (PD3D11CreateDevice == NULL) MessageBoxA(NULL, "GetProcAddress failed for D3D11CreateDevice!", "Critical error", MB_OK | MB_ICONERROR);+ if (PD3D11CreateDevice == nullptr) MessageBoxA(nullptr, "GetProcAddress failed for D3D11CreateDevice!", "Critical error", MB_OK | MB_ICONERROR);- if (PD3D11CreateDeviceAndSwapChain == NULL) MessageBoxA(NULL, "GetProcAddress failed for D3D11CreateDeviceAndSwapChain!", "Critical error", MB_OK | MB_ICONERROR);+ if (PD3D11CreateDeviceAndSwapChain == nullptr) MessageBoxA(nullptr, "GetProcAddress failed for D3D11CreateDeviceAndSwapChain!", "Critical error", MB_OK | MB_ICONERROR);hD3DCompilerDll = LoadLibraryA("D3DCompiler_42.dll");{- MessageBoxA(NULL, "Failed to load D3DCompiler_42.dll, update your DX11 runtime, please", "Critical error", MB_OK | MB_ICONERROR);+ MessageBoxA(nullptr, "Failed to load D3DCompiler_42.dll, update your DX11 runtime, please", "Critical error", MB_OK | MB_ICONERROR);- if (PD3DReflect == NULL) MessageBoxA(NULL, "GetProcAddress failed for D3DReflect!", "Critical error", MB_OK | MB_ICONERROR);+ if (PD3DReflect == nullptr) MessageBoxA(nullptr, "GetProcAddress failed for D3DReflect!", "Critical error", MB_OK | MB_ICONERROR);- if (PD3DCompile == NULL) MessageBoxA(NULL, "GetProcAddress failed for D3DCompile!", "Critical error", MB_OK | MB_ICONERROR);+ if (PD3DCompile == nullptr) MessageBoxA(nullptr, "GetProcAddress failed for D3DCompile!", "Critical error", MB_OK | MB_ICONERROR);- HRESULT hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &feat_level, &context);+ HRESULT hr = PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, &device, &feat_level, &context);{{- PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, NULL, &feat_level, NULL);+ PD3D11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr, D3D11_CREATE_DEVICE_SINGLETHREADED, supported_feature_levels, NUM_SUPPORTED_FEATURE_LEVELS, D3D11_SDK_VERSION, nullptr, &feat_level, nullptr);- hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL);+ hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, nullptr);if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);{- hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL,+ hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,{- hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL,+ hr = PD3D11CreateDeviceAndSwapChain(adapter, D3D_DRIVER_TYPE_UNKNOWN, nullptr,- CHECK(backbuf!=NULL, "Create back buffer texture");+ CHECK(backbuf!=nullptr, "Create back buffer texture");- context->OMSetRenderTargets(1, &backbuf->GetRTV(), NULL);+ context->OMSetRenderTargets(1, &backbuf->GetRTV(), nullptr);{- device = NULL;+ device = nullptr;- CHECK(backbuf!=NULL, "Create back buffer texture");+ CHECK(backbuf!=nullptr, "Create back buffer texture");- return (device != NULL);+ return (device != nullptr);{-#define SAFE_RELEASE(x) { if (x) (x)->Release(); (x) = NULL; }-#define SAFE_DELETE(x) { delete (x); (x) = NULL; }-#define SAFE_DELETE_ARRAY(x) { delete[] (x); (x) = NULL; }+#define SAFE_RELEASE(x) { if (x) (x)->Release(); (x) = nullptr; }+#define SAFE_DELETE(x) { delete (x); (x) = nullptr; }+#define SAFE_DELETE_ARRAY(x) { delete[] (x); (x) = nullptr; }#define CHECK(cond, Message, ...) if (!(cond)) { PanicAlert(__FUNCTION__ "Failed in %s at line %d: " Message, __FILE__, __LINE__, __VA_ARGS__); }{-D3DBlob::D3DBlob(unsigned int blob_size, const u8* init_data) : ref(1), size(blob_size), blob(NULL)+D3DBlob::D3DBlob(unsigned int blob_size, const u8* init_data) : ref(1), size(blob_size), blob(nullptr){{- D3DBlob(unsigned int blob_size, const u8* init_data = NULL);+ D3DBlob(unsigned int blob_size, const u8* init_data = nullptr);{- HRESULT hr = D3D::device->CreateVertexShader(bytecode, len, NULL, &v_shader);+ HRESULT hr = D3D::device->CreateVertexShader(bytecode, len, nullptr, &v_shader);- return NULL;+ return nullptr;{- HRESULT hr = PD3DCompile(code, len, NULL, NULL, NULL, "main", D3D::VertexShaderVersionString(),+ HRESULT hr = PD3DCompile(code, len, nullptr, nullptr, nullptr, "main", D3D::VertexShaderVersionString(),{- *blob = NULL;+ *blob = nullptr;{- HRESULT hr = D3D::device->CreateGeometryShader(bytecode, len, NULL, &g_shader);+ HRESULT hr = D3D::device->CreateGeometryShader(bytecode, len, nullptr, &g_shader);- return NULL;+ return nullptr;{- HRESULT hr = PD3DCompile(code, len, NULL, pDefines, NULL, "main", D3D::GeometryShaderVersionString(),+ HRESULT hr = PD3DCompile(code, len, nullptr, pDefines, nullptr, "main", D3D::GeometryShaderVersionString(),- *blob = NULL;+ *blob = nullptr;{- HRESULT hr = D3D::device->CreatePixelShader(bytecode, len, NULL, &p_shader);+ HRESULT hr = D3D::device->CreatePixelShader(bytecode, len, nullptr, &p_shader);{PanicAlert("CreatePixelShaderFromByteCode failed at %s %d\n", __FILE__, __LINE__);- p_shader = NULL;+ p_shader = nullptr;{- HRESULT hr = PD3DCompile(code, len, NULL, pDefines, NULL, "main", D3D::PixelShaderVersionString(),+ HRESULT hr = PD3DCompile(code, len, nullptr, pDefines, nullptr, "main", D3D::PixelShaderVersionString(),- *blob = NULL;+ *blob = nullptr;{- D3DBlob* blob = NULL;+ D3DBlob* blob = nullptr;{- return NULL;+ return nullptr;{- D3DBlob* blob = NULL;+ D3DBlob* blob = nullptr;{- return NULL;+ return nullptr;{- D3DBlob* blob = NULL;+ D3DBlob* blob = nullptr;{- return NULL;+ return nullptr;- D3DBlob** blob, const D3D_SHADER_MACRO* pDefines = NULL);+ D3DBlob** blob, const D3D_SHADER_MACRO* pDefines = nullptr);- D3DBlob** blob, const D3D_SHADER_MACRO* pDefines = NULL);+ D3DBlob** blob, const D3D_SHADER_MACRO* pDefines = nullptr);- unsigned int len, const D3D_SHADER_MACRO* pDefines = NULL);+ unsigned int len, const D3D_SHADER_MACRO* pDefines = nullptr);{ return CompileAndCreateVertexShader((const char*)code->Data(), code->Size()); }- inline ID3D11GeometryShader* CompileAndCreateGeometryShader(D3DBlob* code, const D3D_SHADER_MACRO* pDefines = NULL)+ inline ID3D11GeometryShader* CompileAndCreateGeometryShader(D3DBlob* code, const D3D_SHADER_MACRO* pDefines = nullptr){ return CompileAndCreateGeometryShader((const char*)code->Data(), code->Size(), pDefines); }{ return CompileAndCreatePixelShader((const char*)code->Data(), code->Size()); }{- ID3D11Texture2D* pTexture = NULL;+ ID3D11Texture2D* pTexture = nullptr;- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &pTexture);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &pTexture);{PanicAlert("Failed to create texture at %s, line %d: hr=%#x\n", __FILE__, __LINE__, hr);- return NULL;+ return nullptr;- : ref(1), tex(texptr), srv(NULL), rtv(NULL), dsv(NULL)+ : ref(1), tex(texptr), srv(nullptr), rtv(nullptr), dsv(nullptr){{- UtilVertexBuffer(int size) : buf(NULL), offset(0), max_size(size)+ UtilVertexBuffer(int size) : buf(nullptr), offset(0), max_size(size){- device->CreateBuffer(&desc, NULL, &buf);+ device->CreateBuffer(&desc, nullptr, &buf);{-UtilVertexBuffer* util_vbuf = NULL;+UtilVertexBuffer* util_vbuf = nullptr;struct FONT2DVERTEX {{const char fontpixshader[] = {VARIABLE_PITCH, _T("Tahoma"));- if (NULL == hFont) return E_FAIL;+ if (nullptr == hFont) return E_FAIL;- ExtTextOutA(hDC, x+1, y+0, ETO_OPAQUE | ETO_CLIPPED, NULL, str, 1, NULL);+ ExtTextOutA(hDC, x+1, y+0, ETO_OPAQUE | ETO_CLIPPED, nullptr, str, 1, nullptr);- hr = device->CreateTexture2D(&texdesc, NULL, &buftex);+ hr = device->CreateTexture2D(&texdesc, nullptr, &buftex);{PanicAlert("Failed to create font texture");- hr = D3D::device->CreateShaderResourceView(buftex, NULL, &m_pTexture);+ hr = D3D::device->CreateShaderResourceView(buftex, nullptr, &m_pTexture);if (FAILED(hr)) PanicAlert("Failed to create shader resource view at %s %d\n", __FILE__, __LINE__);- if (m_pshader == NULL) PanicAlert("Failed to create pixel shader, %s %d\n", __FILE__, __LINE__);+ if (m_pshader == nullptr) PanicAlert("Failed to create pixel shader, %s %d\n", __FILE__, __LINE__);- if (vsbytecode == NULL) PanicAlert("Failed to compile vertex shader, %s %d\n", __FILE__, __LINE__);+ if (vsbytecode == nullptr) PanicAlert("Failed to compile vertex shader, %s %d\n", __FILE__, __LINE__);- if (m_vshader == NULL) PanicAlert("Failed to create vertex shader, %s %d\n", __FILE__, __LINE__);+ if (m_vshader == nullptr) PanicAlert("Failed to create vertex shader, %s %d\n", __FILE__, __LINE__);- if (FAILED(hr = device->CreateBuffer(&vbdesc, NULL, &m_pVB)))+ if (FAILED(hr = device->CreateBuffer(&vbdesc, nullptr, &m_pVB))){PanicAlert("Failed to create font vertex buffer at %s, line %d\n", __FILE__, __LINE__);typedef struct { float x,y,z,u,v,w; } STQVertex;typedef struct { float x,y,z,u,v,w; } STSQVertex;- D3D::context->PSSetShader(PShader, NULL, 0);+ D3D::context->PSSetShader(PShader, nullptr, 0);- D3D::context->VSSetShader(Vshader, NULL, 0);+ D3D::context->VSSetShader(Vshader, nullptr, 0);- ID3D11ShaderResourceView* texres = NULL;+ ID3D11ShaderResourceView* texres = nullptr;- ID3D11ShaderResourceView* texres = NULL;+ ID3D11ShaderResourceView* texres = nullptr;- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);- CHECK(m_efb.color_tex!=NULL, "create EFB color texture (size: %dx%d)", target_width, target_height);+ CHECK(m_efb.color_tex!=nullptr, "create EFB color texture (size: %dx%d)", target_width, target_height);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);- CHECK(m_efb.color_temp_tex!=NULL, "create EFB color temp texture (size: %dx%d)", target_width, target_height);+ CHECK(m_efb.color_temp_tex!=nullptr, "create EFB color temp texture (size: %dx%d)", target_width, target_height);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &m_efb.color_staging_buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &m_efb.color_staging_buf);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &m_efb.depth_staging_buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &m_efb.depth_staging_buf);{- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);- CHECK(m_efb.resolved_color_tex!=NULL, "create EFB color resolve texture (size: %dx%d)", target_width, target_height);+ CHECK(m_efb.resolved_color_tex!=nullptr, "create EFB color resolve texture (size: %dx%d)", target_width, target_height);- hr = D3D::device->CreateTexture2D(&texdesc, NULL, &buf);+ hr = D3D::device->CreateTexture2D(&texdesc, nullptr, &buf);{- D3D::context->OMSetRenderTargets(1, &tex->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &tex->GetRTV(), nullptr);{- state = NULL;+ state = nullptr;-StateManager::StateManager() : cur_blendstate(NULL), cur_depthstate(NULL), cur_raststate(NULL) {}+StateManager::StateManager() : cur_blendstate(nullptr), cur_depthstate(nullptr), cur_raststate(nullptr) {}void StateManager::PushBlendState(const ID3D11BlendState* state) { blendstates.push(AutoBlendState(state)); }void StateManager::PushDepthState(const ID3D11DepthStencilState* state) { depthstates.push(AutoDepthStencilState(state)); }{- D3D::context->OMSetBlendState(cur_blendstate, NULL, 0xFFFFFFFF);+ D3D::context->OMSetBlendState(cur_blendstate, nullptr, 0xFFFFFFFF);- : m_ready(false), m_paramsBuffer(NULL)+ : m_ready(false), m_paramsBuffer(nullptr){ }- hr = D3D::device->CreateBuffer(&bd, NULL, &m_paramsBuffer);+ hr = D3D::device->CreateBuffer(&bd, nullptr, &m_paramsBuffer);D3D_SHADER_MACRO macros[] = {{ "NUM_TEXCOORDS", numTexCoordsStr.c_str() },- { NULL, NULL }+ { nullptr, nullptr }{- m_shaders[components] = NULL;+ m_shaders[components] = nullptr;- D3D::context->GSSetShader(shaderIt->second, NULL, 0);+ D3D::context->GSSetShader(shaderIt->second, nullptr, 0);- D3DVertexFormat() : m_num_elems(0), m_vs_bytecode(NULL), m_layout(NULL) {}+ D3DVertexFormat() : m_num_elems(0), m_vs_bytecode(nullptr), m_layout(nullptr) {}~D3DVertexFormat() { SAFE_RELEASE(m_vs_bytecode); SAFE_RELEASE(m_layout); }{- m_fetchClass[i] = NULL;+ m_fetchClass[i] = nullptr;- m_scaledFetchClass[i] = NULL;+ m_scaledFetchClass[i] = nullptr;- m_intensityClass[i] = NULL;+ m_intensityClass[i] = nullptr;- m_generatorClass[i] = NULL;+ m_generatorClass[i] = nullptr;static const D3D11_INPUT_ELEMENT_DESC QUAD_LAYOUT_DESC[] = {- hr = D3D::device->CreateTexture2D(&t2dd, NULL, &m_out);+ hr = D3D::device->CreateTexture2D(&t2dd, nullptr, &m_out);- hr = D3D::device->CreateTexture2D(&t2dd, NULL, &m_outStage);+ hr = D3D::device->CreateTexture2D(&t2dd, nullptr, &m_outStage);- hr = D3D::device->CreateBuffer(&bd, NULL, &m_encodeParams);+ hr = D3D::device->CreateBuffer(&bd, nullptr, &m_encodeParams);- D3DBlob* bytecode = NULL;+ D3DBlob* bytecode = nullptr;{- hr = D3D::device->CreateVertexShader(bytecode->Data(), bytecode->Size(), NULL, &m_vShader);+ hr = D3D::device->CreateVertexShader(bytecode->Data(), bytecode->Size(), nullptr, &m_vShader);{- D3D::context->VSSetShader(m_vShader, NULL, 0);+ D3D::context->VSSetShader(m_vShader, nullptr, 0);- D3D::context->UpdateSubresource(m_encodeParams, 0, NULL, ¶ms, 0, 0);+ D3D::context->UpdateSubresource(m_encodeParams, 0, nullptr, ¶ms, 0, 0);- D3D::context->OMSetRenderTargets(1, &m_outRTV, NULL);+ D3D::context->OMSetRenderTargets(1, &m_outRTV, nullptr);- IUnknown* nullDummy = NULL;+ IUnknown* nullDummy = nullptr;- D3D::context->OMSetRenderTargets(0, NULL, NULL);+ D3D::context->OMSetRenderTargets(0, nullptr, nullptr);{- const char* generatorFuncName = NULL;+ const char* generatorFuncName = nullptr;{- m_staticShaders[key] = NULL;+ m_staticShaders[key] = nullptr;- D3DBlob* bytecode = NULL;+ D3DBlob* bytecode = nullptr;D3D_SHADER_MACRO macros[] = {{ "IMP_FETCH", FETCH_FUNC_NAMES[fetchNum] },{ "IMP_SCALEDFETCH", SCALEDFETCH_FUNC_NAMES[scaledFetchNum] },{ "IMP_INTENSITY", INTENSITY_FUNC_NAMES[intensityNum] },{ "IMP_GENERATOR", generatorFuncName },- { NULL, NULL }+ { nullptr, nullptr }{- m_staticShaders[key] = NULL;+ m_staticShaders[key] = nullptr;- HRESULT hr = D3D::device->CreatePixelShader(bytecode->Data(), bytecode->Size(), NULL, &newShader);+ HRESULT hr = D3D::device->CreatePixelShader(bytecode->Data(), bytecode->Size(), nullptr, &newShader);{{- D3D::context->PSSetShader(it->second, NULL, 0);+ D3D::context->PSSetShader(it->second, nullptr, 0);D3D_SHADER_MACRO macros[] = {- { "DYNAMIC_MODE", NULL },- { NULL, NULL }+ { "DYNAMIC_MODE", nullptr },+ { nullptr, nullptr }- D3DBlob* bytecode = NULL;+ D3DBlob* bytecode = nullptr;{- ID3D11ShaderReflection* reflect = NULL;+ ID3D11ShaderReflection* reflect = nullptr;- m_linkageArray.resize(numSlots, NULL);+ m_linkageArray.resize(numSlots, nullptr);- m_fetchClass[i] = NULL;+ m_fetchClass[i] = nullptr;- m_scaledFetchClass[i] = NULL;+ m_scaledFetchClass[i] = nullptr;- m_intensityClass[i] = NULL;+ m_intensityClass[i] = nullptr;- m_generatorClass[i] = NULL;+ m_generatorClass[i] = nullptr;- const char* generatorName = NULL;+ const char* generatorName = nullptr;{- m_linkageArray.empty() ? NULL : &m_linkageArray[0],+ m_linkageArray.empty() ? nullptr : &m_linkageArray[0],-ID3D11PixelShader* s_ColorMatrixProgram[2] = {NULL};-ID3D11PixelShader* s_ColorCopyProgram[2] = {NULL};-ID3D11PixelShader* s_DepthMatrixProgram[2] = {NULL};-ID3D11PixelShader* s_rgba6_to_rgb8[2] = {NULL};-ID3D11PixelShader* s_rgb8_to_rgba6[2] = {NULL};+ID3D11PixelShader* s_ColorMatrixProgram[2] = {nullptr};+ID3D11PixelShader* s_ColorCopyProgram[2] = {nullptr};+ID3D11PixelShader* s_DepthMatrixProgram[2] = {nullptr};+ID3D11PixelShader* s_rgba6_to_rgb8[2] = {nullptr};+ID3D11PixelShader* s_rgb8_to_rgba6[2] = {nullptr};const char clear_program_code[] = {- CHECK(s_ColorCopyProgram[1]!=NULL, "Create color copy MSAA pixel shader");+ CHECK(s_ColorCopyProgram[1]!=nullptr, "Create color copy MSAA pixel shader");- CHECK(s_ColorMatrixProgram[1]!=NULL, "Create color matrix MSAA pixel shader");+ CHECK(s_ColorMatrixProgram[1]!=nullptr, "Create color matrix MSAA pixel shader");- CHECK(s_DepthMatrixProgram[1]!=NULL, "Create depth matrix MSAA pixel shader");+ CHECK(s_DepthMatrixProgram[1]!=nullptr, "Create depth matrix MSAA pixel shader");{- CHECK(s_ClearProgram!=NULL, "Create clear pixel shader");+ CHECK(s_ClearProgram!=nullptr, "Create clear pixel shader");- CHECK(s_ColorCopyProgram[0]!=NULL, "Create color copy pixel shader");+ CHECK(s_ColorCopyProgram[0]!=nullptr, "Create color copy pixel shader");- CHECK(s_ColorMatrixProgram[0]!=NULL, "Create color matrix pixel shader");+ CHECK(s_ColorMatrixProgram[0]!=nullptr, "Create color matrix pixel shader");- CHECK(s_DepthMatrixProgram[0]!=NULL, "Create depth matrix pixel shader");+ CHECK(s_DepthMatrixProgram[0]!=nullptr, "Create depth matrix pixel shader");- last_entry = NULL;+ last_entry = nullptr;- last_entry = NULL;+ last_entry = nullptr;{- return (last_entry->shader != NULL);+ return (last_entry->shader != nullptr);- return (entry.shader != NULL);+ return (entry.shader != nullptr);{- if (shader == NULL)+ if (shader == nullptr)- PSCacheEntry() : shader(NULL) {}+ PSCacheEntry() : shader(nullptr) {}void Destroy() { SAFE_RELEASE(shader); }- : m_ready(false), m_paramsBuffer(NULL)+ : m_ready(false), m_paramsBuffer(nullptr){ }- hr = D3D::device->CreateBuffer(&bd, NULL, &m_paramsBuffer);+ hr = D3D::device->CreateBuffer(&bd, nullptr, &m_paramsBuffer);D3D_SHADER_MACRO macros[] = {{ "NUM_TEXCOORDS", numTexCoordsStr.c_str() },- { NULL, NULL }+ { nullptr, nullptr }{- m_shaders[components] = NULL;+ m_shaders[components] = nullptr;- D3D::context->GSSetShader(shaderIt->second, NULL, 0);+ D3D::context->GSSetShader(shaderIt->second, nullptr, 0);-ID3D11BlendState* clearblendstates[4] = {NULL};-ID3D11DepthStencilState* cleardepthstates[3] = {NULL};+ID3D11BlendState* clearblendstates[4] = {nullptr};+ID3D11DepthStencilState* cleardepthstates[3] = {nullptr};-static ID3D11Texture2D* s_screenshot_texture = NULL;+static ID3D11Texture2D* s_screenshot_texture = nullptr;- s_screenshot_texture = NULL;+ s_screenshot_texture = nullptr;{- HRESULT hr = D3D::device->CreateTexture2D(&scrtex_desc, NULL, &s_screenshot_texture);+ HRESULT hr = D3D::device->CreateTexture2D(&scrtex_desc, nullptr, &s_screenshot_texture);- D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBDepthReadTexture()->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBDepthReadTexture()->GetRTV(), nullptr);- D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(), nullptr);- D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTempTexture()->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTempTexture()->GetRTV(), nullptr);- D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), nullptr);float ClearColor[4] = { 0.f, 0.f, 0.f, 1.f };- D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &D3D::GetBackBuffer()->GetRTV(), nullptr);if (FAILED(hr)) PanicAlert("Fail %s %d, stage=%d\n", __FILE__, __LINE__, stage);- // else samplerstate[stage] = NULL;+ // else samplerstate[stage] = nullptr;{- ID3D11ShaderResourceView* shader_resources[8] = { NULL };+ ID3D11ShaderResourceView* shader_resources[8] = { nullptr };- : m_yuyvTexture(NULL), m_yuyvTextureSRV(NULL), m_pShader(NULL)+ : m_yuyvTexture(nullptr), m_yuyvTextureSRV(nullptr), m_pShader(nullptr){ }- CHECK(m_pShader != NULL, "compile and create yuyv decoder pixel shader");+ CHECK(m_pShader != nullptr, "compile and create yuyv decoder pixel shader");{-static TextureEncoder* g_encoder = NULL;+static TextureEncoder* g_encoder = nullptr;ID3D11Buffer* efbcopycbuf[MAX_COPY_BUFFERS] = { 0 };- ID3D11Texture2D* pNewTexture = NULL;+ ID3D11Texture2D* pNewTexture = nullptr;- HRESULT hr = D3D::device->CreateTexture2D(&desc, NULL, &pNewTexture);+ HRESULT hr = D3D::device->CreateTexture2D(&desc, nullptr, &pNewTexture);{- D3D11_SUBRESOURCE_DATA srdata, *data = NULL;+ D3D11_SUBRESOURCE_DATA srdata, *data = nullptr;{- if (NULL == efbcopycbuf[cbufid])+ if (nullptr == efbcopycbuf[cbufid]){- D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), NULL);+ D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), nullptr);- g_encoder = NULL;+ g_encoder = nullptr;{{- D3D::context->GSSetShader(NULL, NULL, 0);+ D3D::context->GSSetShader(nullptr, nullptr, 0);- D3D::context->GSSetShader(NULL, NULL, 0);+ D3D::context->GSSetShader(nullptr, nullptr, 0);ID3D11InputLayout* VertexShaderCache::GetSimpleInputLayout() { return SimpleLayout; }ID3D11InputLayout* VertexShaderCache::GetClearInputLayout() { return ClearLayout; }-ID3D11Buffer* vscbuf = NULL;+ID3D11Buffer* vscbuf = nullptr;{- HRESULT hr = D3D::device->CreateBuffer(&cbdesc, NULL, &vscbuf);+ HRESULT hr = D3D::device->CreateBuffer(&cbdesc, nullptr, &vscbuf);- if (SimpleLayout == NULL || SimpleVertexShader == NULL) PanicAlert("Failed to create simple vertex shader or input layout at %s %d\n", __FILE__, __LINE__);+ if (SimpleLayout == nullptr || SimpleVertexShader == nullptr) PanicAlert("Failed to create simple vertex shader or input layout at %s %d\n", __FILE__, __LINE__);- if (ClearLayout == NULL || ClearVertexShader == NULL) PanicAlert("Failed to create clear vertex shader or input layout at %s %d\n", __FILE__, __LINE__);+ if (ClearLayout == nullptr || ClearVertexShader == nullptr) PanicAlert("Failed to create clear vertex shader or input layout at %s %d\n", __FILE__, __LINE__);- last_entry = NULL;+ last_entry = nullptr;- last_entry = NULL;+ last_entry = nullptr;{- return (last_entry->shader != NULL);+ return (last_entry->shader != nullptr);- return (entry.shader != NULL);+ return (entry.shader != nullptr);- D3DBlob* pbytecode = NULL;+ D3DBlob* pbytecode = nullptr;- if (pbytecode == NULL)+ if (pbytecode == nullptr){{- if (shader == NULL)+ if (shader == nullptr)- VSCacheEntry() : shader(NULL), bytecode(NULL) {}+ VSCacheEntry() : shader(nullptr), bytecode(nullptr) {}{} QUAD_VERTS[4] = { { 0, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } };{ }- hr = D3D::device->CreateTexture2D(&t2dd, NULL, &m_out);+ hr = D3D::device->CreateTexture2D(&t2dd, nullptr, &m_out);- hr = D3D::device->CreateTexture2D(&t2dd, NULL, &m_outStage);+ hr = D3D::device->CreateTexture2D(&t2dd, nullptr, &m_outStage);- hr = D3D::device->CreateBuffer(&bd, NULL, &m_encodeParams);+ hr = D3D::device->CreateBuffer(&bd, nullptr, &m_encodeParams);- D3DBlob* bytecode = NULL;+ D3DBlob* bytecode = nullptr;{- hr = D3D::device->CreateVertexShader(bytecode->Data(), bytecode->Size(), NULL, &m_vShader);+ hr = D3D::device->CreateVertexShader(bytecode->Data(), bytecode->Size(), nullptr, &m_vShader);- D3D::context->UpdateSubresource(m_encodeParams, 0, NULL, ¶ms, 0, 0);+ D3D::context->UpdateSubresource(m_encodeParams, 0, nullptr, ¶ms, 0, 0);- D3D::context->OMSetRenderTargets(1, &m_outRTV, NULL);+ D3D::context->OMSetRenderTargets(1, &m_outRTV, nullptr);- IUnknown* nullDummy = NULL;+ IUnknown* nullDummy = nullptr;- D3D::context->OMSetRenderTargets(0, NULL, NULL);+ D3D::context->OMSetRenderTargets(0, nullptr, nullptr);window_handle = (void*)EmuWindow::Create((HWND)window_handle, GetModuleHandle(0), _T("Loading - Please wait."));- if (window_handle == NULL)+ if (window_handle == nullptr){