Removed alternate timer from Windows port
This commit is contained in:
@@ -914,11 +914,6 @@ GUIOptionKeys:
|
||||
jne .noscreensaver
|
||||
xor byte[DisableScreenSaver],1
|
||||
.noscreensaver
|
||||
cmp dh,'S'
|
||||
jne .noalttimer
|
||||
xor byte[AlternateTimer],1
|
||||
call guimustrestartmsg
|
||||
.noalttimer
|
||||
%endif
|
||||
ret
|
||||
|
||||
|
||||
@@ -2267,8 +2267,7 @@ DisplayGUIOptionClick:
|
||||
GUIClickCButton 11,156,byte[AutoState]
|
||||
GUIClickCButton 11,166,byte[DontSavePath]
|
||||
%ifdef __WIN32__
|
||||
GUIClickCButtonW 11,176,byte[DisableScreenSaver]
|
||||
GUIClickCButtonat 11,186,byte[AlternateTimer]
|
||||
GUIClickCButtonW 11,186,byte[DisableScreenSaver]
|
||||
%endif
|
||||
; Frameskip = 0
|
||||
cmp byte[frameskip],0
|
||||
|
||||
@@ -1417,8 +1417,8 @@ DisplayGUIOption:
|
||||
GUIOuttextwin2u 4,26,151,GUIOptionTextH,9
|
||||
GUIOuttextwin2u 4,26,161,GUIOptionTextI,15
|
||||
GUIOuttextwin2u 4,26,171,GUIOptionTextJ,0
|
||||
; GUIOuttextwin2u 4,26,181,GUIOptionTextK,1
|
||||
%ifdef __WIN32__
|
||||
GUIOuttextwin2u 4,26,181,GUIOptionTextK,1
|
||||
GUIOuttextwin2u 4,26,191,GUIOptionTextL,1
|
||||
%endif
|
||||
add byte[GUItextcolor],15
|
||||
@@ -1443,8 +1443,8 @@ DisplayGUIOption:
|
||||
GUIOuttextwin2 4,25,150,GUIOptionTextH
|
||||
GUIOuttextwin2 4,25,160,GUIOptionTextI
|
||||
GUIOuttextwin2 4,25,170,GUIOptionTextJ
|
||||
; GUIOuttextwin2 4,25,180,GUIOptionTextK
|
||||
%ifdef __WIN32__
|
||||
GUIOuttextwin2 4,25,180,GUIOptionTextK
|
||||
GUIOuttextwin2 4,25,190,GUIOptionTextL
|
||||
%endif
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
@@ -1548,17 +1548,17 @@ DisplayGUIOption:
|
||||
.nocheckbox14
|
||||
GUIDisplayIconWin 4,11,166,[GUITemp]
|
||||
%ifdef __WIN32__
|
||||
; mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
; cmp byte[AlternateTimer],0
|
||||
; je .nocheckbox16
|
||||
; mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||
;.nocheckbox16
|
||||
; GUIDisplayIconWin 4,11,186,[GUITemp]
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
cmp byte[DisableScreenSaver],0
|
||||
je .nocheckbox15
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||
.nocheckbox15
|
||||
GUIDisplayIconWin 4,11,176,[GUITemp]
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxUC
|
||||
cmp byte[AlternateTimer],0
|
||||
je .nocheckbox16
|
||||
mov dword[GUITemp],GUIIconDataCheckBoxC
|
||||
.nocheckbox16
|
||||
GUIDisplayIconWin 4,11,186,[GUITemp]
|
||||
%endif
|
||||
cmp byte[frameskip],0
|
||||
@@ -1624,8 +1624,8 @@ GUIOptionTextG db 'OLD GFX MODE 2',0
|
||||
GUIOptionTextH db 'START AT LATEST SAVE',0
|
||||
GUIOptionTextI db 'AUTO STATE SAVE/LOAD',0
|
||||
GUIOptionTextJ db 'DON',39,'T SAVE CUR PATH',0
|
||||
GUIOptionTextK db 'DISABLE SCREENSAVER',0
|
||||
GUIOptionTextL db 'USE ALTERNATE TIMER',0
|
||||
GUIOptionTextK db 'BLANK SPACE',0
|
||||
GUIOptionTextL db 'DISABLE SCREENSAVER',0
|
||||
GUIOptionText8 db '-',0
|
||||
GUIOptionText9 db '+',0
|
||||
GUIOptionText10 db '-',0
|
||||
|
||||
@@ -122,7 +122,6 @@ BYTE MouseButtonPressed;
|
||||
|
||||
BYTE IsActivated=1;
|
||||
|
||||
BYTE AltTimer=0;
|
||||
WORD PrevRes=0;
|
||||
RECT BlitArea;
|
||||
|
||||
@@ -235,14 +234,14 @@ _int64 start, end, freq, update_ticks_pc, start2, end2, update_ticks_pc2;
|
||||
void ReleaseDirectDraw();
|
||||
void ReleaseDirectSound();
|
||||
void ReleaseDirectInput();
|
||||
int InitDirectDraw();
|
||||
int ReInitSound();
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void drawscreenwin(void);
|
||||
DWORD LastUsedPos=0;
|
||||
DWORD CurMode=-1;
|
||||
int InitDirectDraw();
|
||||
int ReInitSound();
|
||||
void initDirectDraw()
|
||||
{
|
||||
InitDirectDraw();
|
||||
@@ -335,7 +334,6 @@ extern DWORD SoundQuality;
|
||||
extern BYTE HighPriority;
|
||||
extern BYTE AlwaysOnTop;
|
||||
extern BYTE SaveMainWindowPos;
|
||||
extern BYTE AlternateTimer;
|
||||
extern BYTE AllowMultipleInst;
|
||||
extern BYTE DisableScreenSaver;
|
||||
extern BYTE TrapMouseCursor;
|
||||
@@ -1476,16 +1474,8 @@ void Start60HZ(void)
|
||||
update_ticks_pc = UPDATE_TICKS_GAME * freq / 1000;
|
||||
}
|
||||
|
||||
if (AltTimer == 0)
|
||||
{
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start);
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start2);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = timeGetTime();
|
||||
start2 = timeGetTime();
|
||||
}
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start);
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start2);
|
||||
|
||||
T36HZEnabled=0;
|
||||
T60HZEnabled=1;
|
||||
@@ -1501,16 +1491,8 @@ void Start36HZ(void)
|
||||
update_ticks_pc2 = UPDATE_TICKS_UDP * freq / 1000;
|
||||
update_ticks_pc = UPDATE_TICKS_GUI * freq / 1000;
|
||||
|
||||
if (AltTimer == 0)
|
||||
{
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start);
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start2);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = timeGetTime();
|
||||
start2 = timeGetTime();
|
||||
}
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start);
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&start2);
|
||||
|
||||
T60HZEnabled=0;
|
||||
T36HZEnabled=1;
|
||||
@@ -1790,16 +1772,7 @@ void initwinvideo(void)
|
||||
{
|
||||
atexit(ExitFunction);
|
||||
|
||||
AltTimer = AlternateTimer;
|
||||
|
||||
if (AltTimer == 0)
|
||||
{
|
||||
if (!QueryPerformanceFrequency((LARGE_INTEGER*)&freq)) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
freq = CLOCKS_PER_SEC;
|
||||
}
|
||||
if (!QueryPerformanceFrequency((LARGE_INTEGER*)&freq)) return;
|
||||
|
||||
if (!RegisterWinClass())
|
||||
{
|
||||
@@ -1871,8 +1844,7 @@ extern int CounterB;
|
||||
|
||||
void CheckTimers(void)
|
||||
{
|
||||
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
||||
else end2 = timeGetTime();
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&end2);
|
||||
|
||||
while ((end2 - start2) >= update_ticks_pc2)
|
||||
{
|
||||
@@ -1889,8 +1861,7 @@ void CheckTimers(void)
|
||||
|
||||
if (T60HZEnabled == 1)
|
||||
{
|
||||
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||
else end = timeGetTime();
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||
|
||||
while ((end - start) >= update_ticks_pc)
|
||||
{
|
||||
@@ -1901,8 +1872,7 @@ void CheckTimers(void)
|
||||
|
||||
if (T36HZEnabled == 1)
|
||||
{
|
||||
if (AltTimer == 0) QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||
else end = timeGetTime();
|
||||
QueryPerformanceCounter((LARGE_INTEGER*)&end);
|
||||
|
||||
while ((end - start) >= update_ticks_pc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user