Win32 - Tiny speedup - UpdateRamWatch & UpdateRamSearch return immediately if dialogs are not open
This commit is contained in:
parent
1215be45c0
commit
5428c3614a
|
@ -46,7 +46,7 @@
|
|||
#include "stdint.h"
|
||||
#endif
|
||||
|
||||
HWND RamSearchHWnd;
|
||||
HWND RamSearchHWnd = NULL;
|
||||
|
||||
extern HWND RamWatchHWnd;
|
||||
|
||||
|
@ -1175,7 +1175,7 @@ LRESULT CustomDraw (LPARAM lParam)
|
|||
//extern "C" int disableRamSearchUpdate;
|
||||
void Update_RAM_Search() //keeps RAM values up to date in the search and watch windows
|
||||
{
|
||||
|
||||
if (!RamSearchHWnd) return;
|
||||
// if(disableRamSearchUpdate)
|
||||
// return;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <commctrl.h>
|
||||
#include <string>
|
||||
|
||||
HWND RamWatchHWnd;
|
||||
HWND RamWatchHWnd = NULL;
|
||||
|
||||
#define MESSAGEBOXPARENT (RamWatchHWnd ? RamWatchHWnd : MainWindow->getHWnd())
|
||||
|
||||
|
@ -170,6 +170,8 @@ bool InsertWatch(const AddressWatcher& Watch, HWND parent)
|
|||
|
||||
void Update_RAM_Watch()
|
||||
{
|
||||
if (!RamWatchHWnd) return;
|
||||
|
||||
// update cached values and detect changes to displayed listview items
|
||||
BOOL watchChanged[MAX_WATCH_COUNT] = {0};
|
||||
for(int i = 0; i < WatchCount; i++)
|
||||
|
|
Loading…
Reference in New Issue