summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist')
-rw-r--r--src/modules/clist/clistmod.cpp7
-rw-r--r--src/modules/clist/clisttray.cpp4
-rw-r--r--src/modules/clist/clui.cpp11
3 files changed, 8 insertions, 14 deletions
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp
index 7d5fb02e43..025f3dfff7 100644
--- a/src/modules/clist/clistmod.cpp
+++ b/src/modules/clist/clistmod.cpp
@@ -44,7 +44,6 @@ int InitClistHotKeys(void);
HANDLE hContactDoubleClicked, hContactIconChangedEvent;
HIMAGELIST hCListImages;
-BOOL(WINAPI * MySetProcessWorkingSetSize) (HANDLE, SIZE_T, SIZE_T);
extern BYTE nameOrder[];
@@ -414,8 +413,8 @@ int fnShowHide(WPARAM, LPARAM)
db_set_b(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
}
- if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
- MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
+ if (db_get_b(NULL, "CList", "DisableWorkingSet", 1))
+ SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
}
return 0;
}
@@ -511,8 +510,6 @@ int LoadContactListModule2(void)
CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE, HotkeysProcessMessageStub);
CreateServiceFunction(MS_CLIST_GETCONTACTICON, GetContactIcon);
- MySetProcessWorkingSetSize = (BOOL(WINAPI *) (HANDLE, SIZE_T, SIZE_T)) GetProcAddress(GetModuleHandleA("kernel32"), "SetProcessWorkingSetSize");
-
InitDisplayNameCache();
InitCListEvents();
InitGroupServices();
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp
index 321ceb54d1..4c26df5b25 100644
--- a/src/modules/clist/clisttray.cpp
+++ b/src/modules/clist/clisttray.cpp
@@ -27,7 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TOOLTIP_TOLERANCE 5
extern HIMAGELIST hCListImages;
-extern BOOL(WINAPI * MySetProcessWorkingSetSize) (HANDLE, SIZE_T, SIZE_T);
int GetAverageMode(int* pNetProtoCount = NULL);
@@ -590,8 +589,7 @@ static VOID CALLBACK TrayIconAutoHideTimer(HWND hwnd, UINT, UINT_PTR idEvent, DW
HWND hwndClui = cli.hwndContactList;
if (GetActiveWindow() != hwndClui) {
ShowWindow(hwndClui, SW_HIDE);
- if (MySetProcessWorkingSetSize != NULL)
- MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
+ SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
}
}
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index e03d2daf18..af5b739943 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define TM_AUTOALPHA 1
#define MENU_MIRANDAMENU 0xFFFF1234
-extern BOOL(WINAPI * MySetProcessWorkingSetSize) (HANDLE, SIZE_T, SIZE_T);
extern HANDLE hEventExtraClick;
static HMODULE hUserDll;
@@ -546,8 +545,8 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
}
else db_set_b(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
- if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
- MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
+ if (db_get_b(NULL, "CList", "DisableWorkingSet", 1))
+ SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
}
// drop thru
case WM_MOVE:
@@ -639,7 +638,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
break;
if (noRecurse)
break;
- if ( !db_get_b(NULL, "CLUI", "FadeInOut", 0) || !IsWinVer2000Plus())
+ if ( !db_get_b(NULL, "CLUI", "FadeInOut", 0))
break;
if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_LAYERED) {
DWORD thisTick, startTick;
@@ -696,8 +695,8 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
ShowWindow(hwnd, SW_HIDE);
db_set_b(NULL, "CList", "State", SETTING_STATE_HIDDEN);
- if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
- MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
+ if (db_get_b(NULL, "CList", "DisableWorkingSet", 1))
+ SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
return 0;
}