Low CPU usage when emulation paused, new caps for rewind state number and frequency.
This commit is contained in:
@@ -3175,9 +3175,9 @@ DisplayGUISaveClick:
|
||||
GUIClickCButton 11,70,byte[LatestSave]
|
||||
GUIClickCButton 11,80,byte[AutoState]
|
||||
GUIClickCButton 11,90,byte[SRAMState]
|
||||
GUIPHoldbutton2 173,17,181,25,70,byte[RewindStates],1,25
|
||||
GUIPHoldbutton2 173,17,181,25,70,byte[RewindStates],1,99
|
||||
GUIPHoldbutton2 184,17,192,25,71,byte[RewindStates],-1,0
|
||||
GUIPHoldbutton2 173,32,181,40,72,byte[RewindFrames],1,40
|
||||
GUIPHoldbutton2 173,32,181,40,72,byte[RewindFrames],1,99
|
||||
GUIPHoldbutton2 184,32,192,40,73,byte[RewindFrames],-1,0
|
||||
DGOptnsProcBox 27,121,[KeyStateSlc0]
|
||||
DGOptnsProcBox 27+45,121,[KeyStateSlc1]
|
||||
|
||||
@@ -120,6 +120,7 @@ DWORD CurMode = -1;
|
||||
|
||||
extern BYTE GUIOn;
|
||||
extern BYTE GUIOn2;
|
||||
extern BYTE EMUPause;
|
||||
static BYTE IsActivated = 1;
|
||||
|
||||
/* TIMER VARIABLES/MACROS */
|
||||
@@ -1047,7 +1048,7 @@ void UpdateVFrame(void)
|
||||
int i;
|
||||
|
||||
//Quick fix for GUI CPU usage
|
||||
if (GUIOn || GUIOn2) usleep(6000);
|
||||
if (GUIOn || GUIOn2 || EMUPause) usleep(6000);
|
||||
|
||||
CheckTimers();
|
||||
Main_Proc();
|
||||
|
||||
@@ -424,6 +424,7 @@ void initwinvideo();
|
||||
void DosExit(void);
|
||||
extern BYTE GUIOn;
|
||||
extern BYTE GUIOn2;
|
||||
extern BYTE EMUPause;
|
||||
extern BYTE cfgsoundon;
|
||||
extern BYTE StereoSound;
|
||||
extern DWORD SoundQuality;
|
||||
@@ -665,7 +666,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
IsActivated = 0;
|
||||
InputDeAcquire();
|
||||
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
if (GUIOn || GUIOn2 || EMUPause) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
}
|
||||
break;
|
||||
case WM_SETFOCUS:
|
||||
@@ -676,7 +677,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
case WM_KILLFOCUS:
|
||||
InputDeAcquire();
|
||||
IsActivated = 0;
|
||||
if (GUIOn || GUIOn2) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
if (GUIOn || GUIOn2 || EMUPause) SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS);
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
break;
|
||||
@@ -2133,7 +2134,7 @@ void CheckTimers(void)
|
||||
{
|
||||
|
||||
// Lame fix for GUI using 100% CPU
|
||||
if (GUIOn || GUIOn2) Sleep(1);
|
||||
if (GUIOn || GUIOn2 || EMUPause) Sleep(1);
|
||||
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user