- Fixed in-game time. 
- Fixed incorrect implementation of SDL_Delay.
- Achieved maximum smoothness.

git-svn-id: svn://kolibrios.org@9123 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2021-08-06 01:39:17 +00:00
parent c1ce1d963a
commit 8835a95cf8

View File

@ -17,13 +17,12 @@ unsigned uSDL_GetTicks(void){
:"a"(26),"b"(9)
:"memory"
);
return (__curtime-__starttime);
return (__curtime-__starttime)*10;
}
void uSDL_Delay(unsigned time){
__asm__ __volatile__(
"int $0x40"
::"a"(5), "b"(time/3)
:"memory"
);
}
void uSDL_Delay(unsigned ms){
unsigned start = uSDL_GetTicks();
do{
__asm__("int $0x40" :: "a"(68),"b"(1));
}while (uSDL_GetTicks()-start < ms);
}