Fixed high priority mode to work without restarting zsnes
This commit is contained in:
@@ -169,6 +169,9 @@ EXTSYM DeInitModemC
|
|||||||
EXTSYM ipxgetchar,ipxsendchar,TCPIPStoreByte
|
EXTSYM ipxgetchar,ipxsendchar,TCPIPStoreByte
|
||||||
EXTSYM TCPIPGetByte
|
EXTSYM TCPIPGetByte
|
||||||
EXTSYM ModemSendChar
|
EXTSYM ModemSendChar
|
||||||
|
%ifdef __WIN32__
|
||||||
|
EXTSYM CheckPriority
|
||||||
|
%endif
|
||||||
|
|
||||||
NEWSYM GuiAsmStart
|
NEWSYM GuiAsmStart
|
||||||
|
|
||||||
@@ -3210,6 +3213,11 @@ DisplayBoxes:
|
|||||||
cmp al,4
|
cmp al,4
|
||||||
jne .noguioption
|
jne .noguioption
|
||||||
call DisplayGUIOption
|
call DisplayGUIOption
|
||||||
|
%ifdef __WIN32__
|
||||||
|
pushad
|
||||||
|
call CheckPriority
|
||||||
|
popad
|
||||||
|
%endif
|
||||||
jmp .finstuff
|
jmp .finstuff
|
||||||
.noguioption
|
.noguioption
|
||||||
cmp al,5
|
cmp al,5
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ MAINOBJ=cfgload.obj endmem.obj fixsin.obj init.obj ui.obj vcache.obj water.obj
|
|||||||
|
|
||||||
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ} ${WINDOSOBJ}
|
OBJS=${CHIPSOBJ} ${CPUOBJ} ${WINOBJ} ${GUIOBJ} ${VIDEOBJ} ${ZIPOBJ} ${MAINOBJ} ${WINDOSOBJ}
|
||||||
LIBS=
|
LIBS=
|
||||||
CFLAGS=/c
|
CFLAGS=/c /D__WIN32__
|
||||||
ASM=nasm
|
ASM=nasm
|
||||||
ASMFLAGS=-f win32
|
ASMFLAGS=-f win32 -D__WIN32__
|
||||||
CC=cl
|
CC=cl
|
||||||
|
|
||||||
.SUFFIXES: .c .cpp .asm
|
.SUFFIXES: .c .cpp .asm
|
||||||
|
|||||||
@@ -191,6 +191,12 @@ extern int CurKeyReadPos;
|
|||||||
extern int KeyBuffer[16];
|
extern int KeyBuffer[16];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void CheckPriority ( void )
|
||||||
|
{
|
||||||
|
if (HighPriority == 1) SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
||||||
|
else SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS);
|
||||||
|
}
|
||||||
|
|
||||||
BOOL InputRead(void)
|
BOOL InputRead(void)
|
||||||
{
|
{
|
||||||
static PrevZ=0;
|
static PrevZ=0;
|
||||||
@@ -439,7 +445,6 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int RegisterWinClass ( void )
|
int RegisterWinClass ( void )
|
||||||
{
|
{
|
||||||
WNDCLASS wcl;
|
WNDCLASS wcl;
|
||||||
@@ -456,7 +461,7 @@ int RegisterWinClass ( void )
|
|||||||
wcl.lpszMenuName = NULL;
|
wcl.lpszMenuName = NULL;
|
||||||
wcl.lpszClassName = "ZSNESWIN";
|
wcl.lpszClassName = "ZSNESWIN";
|
||||||
|
|
||||||
if (HighPriority == 1) SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
CheckPriority();
|
||||||
|
|
||||||
if (RegisterClass(&wcl) == 0) return FALSE;
|
if (RegisterClass(&wcl) == 0) return FALSE;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user