Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdev-new committed Jul 29, 2023
1 parent 917e318 commit b437a23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
10 changes: 0 additions & 10 deletions getinput/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,7 @@ DWORD GETINPUT_SUB CALLBACK MousePosThread(void* data) {

HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);

//unsigned __int64 begin, took;

while (1) {
//begin = GetTickCount64();
ReadConsoleInput(hStdIn, &ir, 1, &read);

switch (ir.EventType) {
Expand All @@ -248,8 +245,6 @@ DWORD GETINPUT_SUB CALLBACK MousePosThread(void* data) {
break;
}

//took = GetTickCount64() - begin;
//Sleep(_max(sleep_time - took, 0));
YieldProcessor();
}

Expand Down Expand Up @@ -299,11 +294,6 @@ DWORD GETINPUT_SUB CALLBACK Process(void*) {
HANDLE hModeThread = CreateThread(NULL, 0, ModeThread, NULL, 0, NULL);
HANDLE hReadThread = CreateThread(NULL, 0, MousePosThread, hIn, 0, NULL);

//SetThreadAffinityMask(hReadThread, 1ull << 1);
//SetThreadAffinityMask(hModeThread, 1ull << 2);
//SetThreadPriority(hModeThread, THREAD_PRIORITY_LOWEST);
//SetThreadPriority(hReadThread, THREAD_PRIORITY_LOWEST);

unsigned __int64 begin, took;

while (TRUE) {
Expand Down
4 changes: 1 addition & 3 deletions shared_stuff/Injector.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ NOMANGLE __declspec(dllexport) BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwRe
\
if (dwReason == DLL_PROCESS_ATTACH) {\
DisableThreadLibraryCalls(hInst);\
HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProcName, NULL, 0, NULL);\
/*SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);*/\
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProcName, NULL, 0, NULL);\
}\
return TRUE;\
}
Expand Down Expand Up @@ -65,7 +64,6 @@ NOMANGLE __declspec(dllexport) void CALLBACK inject(HWND hwnd, HINSTANCE hinst,

LPTHREAD_START_ROUTINE startAddr = (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle("kernel32.dll"), "LoadLibraryA");
HANDLE hThread = CreateRemoteThread(hProcess, NULL, 0, startAddr, lpBaseAddress, 0, NULL);
//SetThreadPriority(hThread, THREAD_PRIORITY_LOWEST);
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
CloseHandle(hProcess);
Expand Down

0 comments on commit b437a23

Please sign in to comment.