Removed unnecessary calls to SetWindowText

This commit is contained in:
ergo720 2021-05-14 12:01:27 +02:00
parent 2397ece059
commit c769dce20e
2 changed files with 1 additions and 35 deletions

View File

@ -5492,16 +5492,7 @@ xbox::dword_xt WINAPI xbox::EMUPATCH(D3DDevice_Swap)
if (Flags == CXBX_SWAP_PRESENT_FORWARD) // Only do this when forwarded from Present
{
// Put primitives per frame in the title
/*{
char szString[64];
sprintf( szString, "Cxbx: PPF(%d)", g_dwPrimPerFrame );
SetWindowText( CxbxKrnl_hEmuParent, szString );
g_dwPrimPerFrame = 0;
}*/
// TODO: print the primitives per frame with ImGui
// TODO : Check if this should be done at Swap-not-Present-time too :
// not really accurate because you definately dont always present on every vblank

View File

@ -1801,18 +1801,6 @@ void CxbxKrnlSuspend()
}
}
// append 'paused' to rendering window caption text
{
char szBuffer[256];
HWND hWnd = GET_FRONT_WINDOW_HANDLE;
GetWindowText(hWnd, szBuffer, 255 - 10);
strcat(szBuffer, " (paused)");
SetWindowText(hWnd, szBuffer);
}
g_bEmuSuspended = true;
}
@ -1821,19 +1809,6 @@ void CxbxKrnlResume()
if(!g_bEmuSuspended)
return;
// remove 'paused' from rendering window caption text
{
char szBuffer[256];
HWND hWnd = GET_FRONT_WINDOW_HANDLE;
GetWindowText(hWnd, szBuffer, 255);
szBuffer[strlen(szBuffer)-9] = '\0';
SetWindowText(hWnd, szBuffer);
}
for (auto it = g_hThreads.begin(); it != g_hThreads.end(); ++it)
{
DWORD dwExitCode;