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