Mirror F1/F3 menu CPU usage fix in Windows version and a type in the previous commit I just put in CVS a second ago
This commit is contained in:
@@ -1047,7 +1047,7 @@ void UpdateVFrame(void)
|
||||
int i;
|
||||
|
||||
//Quick fix for GUI CPU usage
|
||||
if (GUIOn | GUIOn2) usleep(6000);
|
||||
if (GUIOn || GUIOn2) usleep(6000);
|
||||
|
||||
CheckTimers();
|
||||
Main_Proc();
|
||||
|
||||
@@ -422,6 +422,7 @@ BOOL InputDeAcquire(void)
|
||||
extern "C" {
|
||||
void initwinvideo();
|
||||
void DosExit(void);
|
||||
extern BYTE GUIOn;
|
||||
extern BYTE GUIOn2;
|
||||
extern BYTE cfgsoundon;
|
||||
extern BYTE StereoSound;
|
||||
@@ -658,7 +659,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
IsActivated = 0;
|
||||
InputDeAcquire();
|
||||
if (GUIOn2 == 1) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
}
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
@@ -669,7 +670,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
case WM_KILLFOCUS:
|
||||
InputDeAcquire();
|
||||
IsActivated = 0;
|
||||
if (GUIOn2 == 1) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
break;
|
||||
@@ -2110,7 +2111,7 @@ void CheckTimers(void)
|
||||
{
|
||||
|
||||
// Lame fix for GUI using 100% CPU
|
||||
if (GUIOn2) Sleep(1);
|
||||
if (GUIOn || GUIOn2) Sleep(1);
|
||||
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user