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