Added disable screensaver option; moved disable spc emu to sound menu
This commit is contained in:
@@ -176,6 +176,7 @@ EXTSYM numlockptr
|
|||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
EXTSYM CheckPriority
|
EXTSYM CheckPriority
|
||||||
EXTSYM CheckAlwaysOnTop
|
EXTSYM CheckAlwaysOnTop
|
||||||
|
EXTSYM CheckScreenSaver
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
NEWSYM GuiAsmStart
|
NEWSYM GuiAsmStart
|
||||||
@@ -584,6 +585,7 @@ NEWSYM BilinearFilter, db 0
|
|||||||
NEWSYM TripleBufferWin, db 0
|
NEWSYM TripleBufferWin, db 0
|
||||||
|
|
||||||
NEWSYM ExclusiveSound, db 0
|
NEWSYM ExclusiveSound, db 0
|
||||||
|
NEWSYM DisableScreenSaver, db 0
|
||||||
|
|
||||||
GUIsave equ $-GUIRAdd
|
GUIsave equ $-GUIRAdd
|
||||||
|
|
||||||
@@ -602,9 +604,9 @@ ModemOKStat db 0 ; OK is detected on modem status
|
|||||||
|
|
||||||
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO
|
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO
|
||||||
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
|
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
|
||||||
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,26 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60
|
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,20 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60
|
||||||
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,13*16,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
|
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,148 ,244 ,8*16,13*16,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
|
||||||
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,178 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60
|
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,184 ,191 ,40 ,189 ,192 ,98 ,42 ,40 ,42 ,70 ,190 ,60
|
||||||
GUIwinptr db 0
|
GUIwinptr db 0
|
||||||
|
|
||||||
GUItextcolor db 0,0,0,0,0
|
GUItextcolor db 0,0,0,0,0
|
||||||
@@ -3400,6 +3402,7 @@ DisplayBoxes:
|
|||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
pushad
|
pushad
|
||||||
call CheckPriority
|
call CheckPriority
|
||||||
|
call CheckScreenSaver
|
||||||
popad
|
popad
|
||||||
%endif
|
%endif
|
||||||
jmp .finstuff
|
jmp .finstuff
|
||||||
|
|||||||
@@ -888,11 +888,11 @@ GUIOptionKeys:
|
|||||||
jne .nosavepath
|
jne .nosavepath
|
||||||
xor byte[DontSavePath],1
|
xor byte[DontSavePath],1
|
||||||
.nosavepath
|
.nosavepath
|
||||||
cmp dh,'I'
|
|
||||||
jne .nospcdisable
|
|
||||||
xor byte[SPCDisable],1
|
|
||||||
.nospcdisable
|
|
||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
|
cmp dh,'I'
|
||||||
|
jne .noscreensaver
|
||||||
|
xor byte[DisableScreenSaver],1
|
||||||
|
.noscreensaver
|
||||||
cmp dh,'S'
|
cmp dh,'S'
|
||||||
jne .noalttimer
|
jne .noalttimer
|
||||||
xor byte[AlternateTimer],1
|
xor byte[AlternateTimer],1
|
||||||
@@ -1020,6 +1020,10 @@ GUISoundKeys:
|
|||||||
jne .nocubic
|
jne .nocubic
|
||||||
xor byte[UseCubicSpline],1
|
xor byte[UseCubicSpline],1
|
||||||
.nocubic
|
.nocubic
|
||||||
|
cmp dh,'D'
|
||||||
|
jne .nospcdisable
|
||||||
|
xor byte[SPCDisable],1
|
||||||
|
.nospcdisable
|
||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
cmp dh,'X'
|
cmp dh,'X'
|
||||||
jne .noexclusivesound
|
jne .noexclusivesound
|
||||||
|
|||||||
@@ -2119,8 +2119,8 @@ DisplayGUIOptionClick:
|
|||||||
GUIClickCButton 11,146,byte[LatestSave]
|
GUIClickCButton 11,146,byte[LatestSave]
|
||||||
GUIClickCButton 11,156,byte[AutoState]
|
GUIClickCButton 11,156,byte[AutoState]
|
||||||
GUIClickCButton 11,166,byte[DontSavePath]
|
GUIClickCButton 11,166,byte[DontSavePath]
|
||||||
GUIClickCButton 11,176,byte[SPCDisable]
|
|
||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
|
GUIClickCButton 11,176,byte[DisableScreenSaver]
|
||||||
GUIClickCButtonat 11,186,byte[AlternateTimer]
|
GUIClickCButtonat 11,186,byte[AlternateTimer]
|
||||||
%endif
|
%endif
|
||||||
; Frameskip = 0
|
; Frameskip = 0
|
||||||
@@ -2249,8 +2249,9 @@ DisplayGUISoundClick:
|
|||||||
GUIClickCButton 11,141,byte[LowPassFilter]
|
GUIClickCButton 11,141,byte[LowPassFilter]
|
||||||
GUIClickCButton 11,151,byte[SoundBufEn]
|
GUIClickCButton 11,151,byte[SoundBufEn]
|
||||||
GUIClickCButton 11,161,byte[UseCubicSpline]
|
GUIClickCButton 11,161,byte[UseCubicSpline]
|
||||||
|
GUIClickCButton 11,171,byte[SPCDisable]
|
||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
GUIClickCButton 11,171,byte[ExclusiveSound]
|
GUIClickCButton 11,181,byte[ExclusiveSound]
|
||||||
%endif
|
%endif
|
||||||
cmp eax,15
|
cmp eax,15
|
||||||
jl near .nosrate
|
jl near .nosrate
|
||||||
|
|||||||
@@ -1504,13 +1504,13 @@ DisplayGUIOption:
|
|||||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||||
.nocheckbox13
|
.nocheckbox13
|
||||||
GUIDisplayIconWin 4,11,166,[GUITemp]
|
GUIDisplayIconWin 4,11,166,[GUITemp]
|
||||||
|
%ifdef __WIN32__
|
||||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||||
cmp byte[SPCDisable],0
|
cmp byte[DisableScreenSaver],0
|
||||||
je .nocheckbox14
|
je .nocheckbox14
|
||||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||||
.nocheckbox14
|
.nocheckbox14
|
||||||
GUIDisplayIconWin 4,11,176,[GUITemp]
|
GUIDisplayIconWin 4,11,176,[GUITemp]
|
||||||
%ifdef __WIN32__
|
|
||||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||||
cmp byte[AlternateTimer],0
|
cmp byte[AlternateTimer],0
|
||||||
je .win323
|
je .win323
|
||||||
@@ -1580,7 +1580,7 @@ GUIOptionTextG db 'OLD GFX MODE 2',0
|
|||||||
GUIOptionTextH db 'START AT LATEST SAVE',0
|
GUIOptionTextH db 'START AT LATEST SAVE',0
|
||||||
GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0
|
GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0
|
||||||
GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0
|
GUIOptionTextJ db 'DON',39,'T SAVE CURRENT PATH',0
|
||||||
GUIOptionTextK db 'DISABLE SOUND CPU EMU',0
|
GUIOptionTextK db 'DISABLE SCREENSAVER',0
|
||||||
GUIOptionTextL db 'USE ALTERNATE TIMER',0
|
GUIOptionTextL db 'USE ALTERNATE TIMER',0
|
||||||
GUIOptionText8 db '-',0
|
GUIOptionText8 db '-',0
|
||||||
GUIOptionText9 db '+',0
|
GUIOptionText9 db '+',0
|
||||||
@@ -2140,8 +2140,9 @@ DisplayGUISound:
|
|||||||
GUIOuttextwin2u 6,26,146,GUISoundTextK,0
|
GUIOuttextwin2u 6,26,146,GUISoundTextK,0
|
||||||
GUIOuttextwin2u 6,26,156,GUISoundTextL,6
|
GUIOuttextwin2u 6,26,156,GUISoundTextL,6
|
||||||
GUIOuttextwin2u 6,26,166,GUISoundTextM,0
|
GUIOuttextwin2u 6,26,166,GUISoundTextM,0
|
||||||
|
GUIOuttextwin2u 6,26,176,GUISoundTextN,0
|
||||||
%ifdef __WIN32__
|
%ifdef __WIN32__
|
||||||
GUIOuttextwin2u 6,26,176,GUISoundTextN,1
|
GUIOuttextwin2u 6,26,186,GUISoundTextO,1
|
||||||
%endif
|
%endif
|
||||||
add byte[GUItextcolor],15
|
add byte[GUItextcolor],15
|
||||||
GUIOuttextwin2 6,25,25,GUISoundText1
|
GUIOuttextwin2 6,25,25,GUISoundText1
|
||||||
@@ -2167,8 +2168,9 @@ DisplayGUISound:
|
|||||||
GUIOuttextwin2 6,25,145,GUISoundTextK
|
GUIOuttextwin2 6,25,145,GUISoundTextK
|
||||||
GUIOuttextwin2 6,25,155,GUISoundTextL
|
GUIOuttextwin2 6,25,155,GUISoundTextL
|
||||||
GUIOuttextwin2 6,25,165,GUISoundTextM
|
GUIOuttextwin2 6,25,165,GUISoundTextM
|
||||||
%ifdef __WIN32__
|
|
||||||
GUIOuttextwin2 6,25,175,GUISoundTextN
|
GUIOuttextwin2 6,25,175,GUISoundTextN
|
||||||
|
%ifdef __WIN32__
|
||||||
|
GUIOuttextwin2 6,25,185,GUISoundTextO
|
||||||
%endif
|
%endif
|
||||||
mov al,[GUIWincol]
|
mov al,[GUIWincol]
|
||||||
mov byte[GUItextcolor],al
|
mov byte[GUItextcolor],al
|
||||||
@@ -2261,13 +2263,19 @@ DisplayGUISound:
|
|||||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||||
.nocheckbox8
|
.nocheckbox8
|
||||||
GUIDisplayIconWin 6,11,161,[GUITemp]
|
GUIDisplayIconWin 6,11,161,[GUITemp]
|
||||||
%ifdef __WIN32__
|
|
||||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||||
cmp byte[ExclusiveSound],0
|
cmp byte[SPCDisable],0
|
||||||
je .nocheckbox9
|
je .nocheckbox9
|
||||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||||
.nocheckbox9
|
.nocheckbox9
|
||||||
GUIDisplayIconWin 6,11,171,[GUITemp]
|
GUIDisplayIconWin 6,11,171,[GUITemp]
|
||||||
|
%ifdef __WIN32__
|
||||||
|
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||||
|
cmp byte[ExclusiveSound],0
|
||||||
|
je .nocheckbox10
|
||||||
|
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||||
|
.nocheckbox10
|
||||||
|
GUIDisplayIconWin 6,11,181,[GUITemp]
|
||||||
%endif
|
%endif
|
||||||
DrawGUIWinBox 6,15,61,69,69,167
|
DrawGUIWinBox 6,15,61,69,69,167
|
||||||
mov dword[GUITemp],GUISoundText7
|
mov dword[GUITemp],GUISoundText7
|
||||||
@@ -2359,7 +2367,8 @@ GUISoundTextJ db 'SOUND INTERPOLATION',0
|
|||||||
GUISoundTextK db 'LOW PASS FILTER',0
|
GUISoundTextK db 'LOW PASS FILTER',0
|
||||||
GUISoundTextL db 'SOUND BUFFERING',0
|
GUISoundTextL db 'SOUND BUFFERING',0
|
||||||
GUISoundTextM db 'CUBIC SPLINE INTERP',0
|
GUISoundTextM db 'CUBIC SPLINE INTERP',0
|
||||||
GUISoundTextN db 'EXCLUSIVE MODE',0
|
GUISoundTextN db 'DISABLE SPC EMU',0
|
||||||
|
GUISoundTextO db 'EXCLUSIVE MODE',0
|
||||||
|
|
||||||
DisplayGUICheatConv:
|
DisplayGUICheatConv:
|
||||||
mov eax,[ccheatnpos]
|
mov eax,[ccheatnpos]
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ extern BYTE AlwaysOnTop;
|
|||||||
extern BYTE SaveMainWindowPos;
|
extern BYTE SaveMainWindowPos;
|
||||||
extern BYTE AlternateTimer;
|
extern BYTE AlternateTimer;
|
||||||
extern BYTE AllowMultipleInst;
|
extern BYTE AllowMultipleInst;
|
||||||
|
extern BYTE DisableScreenSaver;
|
||||||
extern signed short int MainWindowX;
|
extern signed short int MainWindowX;
|
||||||
extern signed short int MainWindowY;
|
extern signed short int MainWindowY;
|
||||||
extern int CurKeyPos;
|
extern int CurKeyPos;
|
||||||
@@ -340,6 +341,12 @@ extern "C" void CheckAlwaysOnTop()
|
|||||||
else SetWindowPos(hMainWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
else SetWindowPos(hMainWindow, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void CheckScreenSaver()
|
||||||
|
{
|
||||||
|
if (DisableScreenSaver == 1 && IsActivated == 1) SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, FALSE, 0, SPIF_SENDWININICHANGE);
|
||||||
|
else SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, TRUE, 0, SPIF_SENDWININICHANGE);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void MinimizeWindow()
|
extern "C" void MinimizeWindow()
|
||||||
{
|
{
|
||||||
ShowWindow(hMainWindow, SW_MINIMIZE);
|
ShowWindow(hMainWindow, SW_MINIMIZE);
|
||||||
@@ -412,6 +419,8 @@ aquireagain:;
|
|||||||
|
|
||||||
void ExitFunction()
|
void ExitFunction()
|
||||||
{
|
{
|
||||||
|
IsActivated = 0;
|
||||||
|
CheckScreenSaver();
|
||||||
ReleaseDirectInput();
|
ReleaseDirectInput();
|
||||||
ReleaseDirectSound();
|
ReleaseDirectSound();
|
||||||
ReleaseDirectDraw();
|
ReleaseDirectDraw();
|
||||||
@@ -530,8 +539,13 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
if (FirstActivate == 0) initwinvideo();
|
if (FirstActivate == 0) initwinvideo();
|
||||||
InputAcquire();
|
InputAcquire();
|
||||||
if (FirstActivate == 1) FirstActivate = 0;
|
if (FirstActivate == 1) FirstActivate = 0;
|
||||||
|
CheckScreenSaver();
|
||||||
|
}
|
||||||
|
if (LOWORD(wParam) == WA_INACTIVE)
|
||||||
|
{
|
||||||
|
IsActivated = 0;
|
||||||
|
CheckScreenSaver();
|
||||||
}
|
}
|
||||||
if (LOWORD(wParam) == WA_INACTIVE) IsActivated = 0;
|
|
||||||
break;
|
break;
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
if (FullScreen == 0) ShowWindow(hMainWindow, SW_SHOWNORMAL);
|
if (FullScreen == 0) ShowWindow(hMainWindow, SW_SHOWNORMAL);
|
||||||
@@ -540,6 +554,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;
|
||||||
|
CheckScreenSaver();
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
break;
|
break;
|
||||||
@@ -1684,6 +1699,7 @@ void initwinvideo(void)
|
|||||||
|
|
||||||
CheckPriority();
|
CheckPriority();
|
||||||
CheckAlwaysOnTop();
|
CheckAlwaysOnTop();
|
||||||
|
CheckScreenSaver();
|
||||||
|
|
||||||
if (!hMainWindow)
|
if (!hMainWindow)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user