forked from KolibriOS/kolibrios
Wolf3D:
- 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:
parent
c1ce1d963a
commit
8835a95cf8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user