return local address

This commit is contained in:
duzib 2017-11-18 23:36:29 +08:00
parent 10cf69cd93
commit d375050592

View File

@ -20,6 +20,7 @@ struct _MData{
Window XWin; // Handle to an X11 window
#elif defined(IS_WINDOWS)
HWND HWnd; // Handle to a window HWND
TCHAR Title[512];
#endif
};
@ -27,6 +28,7 @@ typedef struct _MData MData;
MData mData;
bool setHandle(uintptr handle);
bool IsValid();
bool IsAxEnabled(bool options);
@ -857,9 +859,7 @@ char *GetTitle(){
#elif defined(IS_WINDOWS)
TCHAR name[512];
return GetWindowText
(mData.HWnd, name, 512) > 0 ? name : "null";
return GetWindowText(mData.HWnd, mData.Title, 512) > 0 ? mData.Title : "null";
// return GetWindowText
// (mData.HWnd, name, 512) > 0 ?
// _UTF8Encode (name) : "null";