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;
|
int i;
|
||||||
|
|
||||||
//Quick fix for GUI CPU usage
|
//Quick fix for GUI CPU usage
|
||||||
if (GUIOn | GUIOn2) usleep(6000);
|
if (GUIOn || GUIOn2) usleep(6000);
|
||||||
|
|
||||||
CheckTimers();
|
CheckTimers();
|
||||||
Main_Proc();
|
Main_Proc();
|
||||||
|
|||||||
@@ -422,6 +422,7 @@ BOOL InputDeAcquire(void)
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
void initwinvideo();
|
void initwinvideo();
|
||||||
void DosExit(void);
|
void DosExit(void);
|
||||||
|
extern BYTE GUIOn;
|
||||||
extern BYTE GUIOn2;
|
extern BYTE GUIOn2;
|
||||||
extern BYTE cfgsoundon;
|
extern BYTE cfgsoundon;
|
||||||
extern BYTE StereoSound;
|
extern BYTE StereoSound;
|
||||||
@@ -658,7 +659,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
{
|
{
|
||||||
IsActivated = 0;
|
IsActivated = 0;
|
||||||
InputDeAcquire();
|
InputDeAcquire();
|
||||||
if (GUIOn2 == 1) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
@@ -669,7 +670,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
case WM_KILLFOCUS:
|
case WM_KILLFOCUS:
|
||||||
InputDeAcquire();
|
InputDeAcquire();
|
||||||
IsActivated = 0;
|
IsActivated = 0;
|
||||||
if (GUIOn2 == 1) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
break;
|
break;
|
||||||
@@ -2110,7 +2111,7 @@ void CheckTimers(void)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Lame fix for GUI using 100% CPU
|
// Lame fix for GUI using 100% CPU
|
||||||
if (GUIOn2) Sleep(1);
|
if (GUIOn || GUIOn2) Sleep(1);
|
||||||
|
|
||||||
QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user