22 lines
305 B
C
22 lines
305 B
C
|
char canRenderFrame = 0;
|
||
|
char elapsedTicks = 0;
|
||
|
|
||
|
void far (interrupt *oldTimer());
|
||
|
|
||
|
void far interrupt timerInterrupt() {
|
||
|
_disable();
|
||
|
|
||
|
elapsedTicks++;
|
||
|
if (elapsedTicks > SOME_THRESHOLD_FOR_30FPS) {
|
||
|
canRenderFrame = 1;
|
||
|
elapsedTicks = 0;
|
||
|
}
|
||
|
|
||
|
oldTimer();
|
||
|
|
||
|
int(0x20, 0x20);
|
||
|
_enable()
|
||
|
}
|
||
|
|
||
|
|