gameclock fix
This commit is contained in:
@@ -2115,28 +2115,21 @@ NEWSYM GotoHomepage
|
|||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
EXTSYM SystemTimewHour
|
||||||
|
EXTSYM SystemTimewMinute
|
||||||
|
EXTSYM SystemTimewSecond
|
||||||
|
|
||||||
NEWSYM GetTimeInSeconds
|
NEWSYM GetTimeInSeconds
|
||||||
push dword SystemTime
|
call GetLocalTime
|
||||||
call [GetLocalTime]
|
movzx eax,word [SystemTimewHour]
|
||||||
movzx eax,word [SystemTime.wHour]
|
|
||||||
mov ebx,60
|
mov ebx,60
|
||||||
mul ebx
|
mul ebx
|
||||||
movzx ebx,word [SystemTime.wMinute]
|
movzx ebx,word [SystemTimewMinute]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
mov ebx,60
|
mov ebx,60
|
||||||
mul ebx
|
mul ebx
|
||||||
movzx ebx,word [SystemTime.wSecond]
|
movzx ebx,word [SystemTimewSecond]
|
||||||
add eax,ebx
|
add eax,ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
SystemTime:
|
|
||||||
.wYear dw 0
|
|
||||||
.wMonth dw 0
|
|
||||||
.wDayOfWeek dw 0
|
|
||||||
.wDay dw 0
|
|
||||||
.wHour dw 0
|
|
||||||
.wMinute dw 0
|
|
||||||
.wSecond dw 0
|
|
||||||
.wMilliseconds dw 0
|
|
||||||
|
|
||||||
NEWSYM WinIntRFAsmEnd
|
NEWSYM WinIntRFAsmEnd
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <time.h>
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#else // __WIN32__
|
#else // __WIN32__
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
@@ -1713,9 +1714,19 @@ void ZsnesPage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
void GetLocalTime(void *pointer)
|
short SystemTimewHour;
|
||||||
|
short SystemTimewMinute;
|
||||||
|
short SystemTimewSecond;
|
||||||
|
|
||||||
|
void GetLocalTime()
|
||||||
{
|
{
|
||||||
STUB_FUNCTION;
|
time_t current;
|
||||||
|
struct tm *timeptr;
|
||||||
|
time (¤t);
|
||||||
|
timeptr = localtime(¤t);
|
||||||
|
SystemTimewHour = timeptr->tm_hour;
|
||||||
|
SystemTimewMinute = timeptr->tm_min;
|
||||||
|
SystemTimewSecond = timeptr->tm_sec;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user