Skip to content

Commit

Permalink
fix log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
DeltaGW2 committed Nov 19, 2024
1 parent 58079d4 commit 7c0da12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
2 changes: 2 additions & 0 deletions GW2-SlashGG.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>src/</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -81,6 +82,7 @@ CALL $(SolutionDir)Scripts\version.bat</Command>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>src/</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand Down
33 changes: 7 additions & 26 deletions src/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,18 +476,6 @@ void PerformSudoku()
break;
}

/*if (OpenClipboard(Game))
{
bufferPrevious = (char*)GetClipboardData(CF_TEXT);
HGLOBAL clipbuffer = GlobalAlloc(GMEM_DDESHARE, 4);
char* buffer = (char*)GlobalLock(clipbuffer);
strcpy_s(buffer, 4, LPCSTR(source));
GlobalUnlock(clipbuffer);
SetClipboardData(CF_TEXT, clipbuffer);
CloseClipboard();
}*/

if (!MumbleLink->Context.IsTextboxFocused && MumbleLink->Context.MapType == Mumble::EMapType::Instance)
{
std::string cbPrevious;
Expand All @@ -506,10 +494,14 @@ void PerformSudoku()
HANDLE cbHandleOld = GetClipboardData(CF_TEXT);
if (cbHandleOld)
{
cbPrevious = (char*)GlobalLock(cbHandleOld);
lenPrevious = cbPrevious.size() + 1;
LPVOID memLockOld = GlobalLock(cbHandleOld);
if (memLockOld)
{
cbPrevious = (char*)memLockOld;
lenPrevious = cbPrevious.size() + 1;
GlobalUnlock(cbHandleOld);
}
}
GlobalUnlock(cbHandleOld);
EmptyClipboard();
SetClipboardData(CF_TEXT, hMem);
CloseClipboard();
Expand Down Expand Up @@ -569,8 +561,6 @@ void PerformSudoku()
}
}

APIDefs->Log(ELogLevel_DEBUG, "wtf", std::to_string(wait).c_str());

/* continue loop */
if (wait < 50)
{
Expand All @@ -589,15 +579,6 @@ void PerformSudoku()
/* return stroke */
SendInput(ARRAYSIZE(retPress), retPress, sizeof(INPUT));
SendInput(ARRAYSIZE(retRelease), retRelease, sizeof(INPUT));

/*Sleep(15);
for (int i = 0; i < strlen(source); i++)
{
PostMessage(Game, WM_CHAR, (WPARAM)source[i], 0); Sleep(15);
}*/

//PostMessage(Game, WM_KEYDOWN, VK_RETURN, GetLPARAM(VK_RETURN, 1, 0));
//PostMessage(Game, WM_KEYUP, VK_RETURN, GetLPARAM(VK_RETURN, 0, 0));
}

if (!cbPrevious.empty())
Expand Down

0 comments on commit 7c0da12

Please sign in to comment.