Skip to content

Commit

Permalink
Fix: Build failure in non Graphics mode
Browse files Browse the repository at this point in the history
Also includes:
* Minor comments added.
  • Loading branch information
coderarjob committed Oct 21, 2024
1 parent 91a5900 commit a3e3f0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kernel/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ static GraphicsInfo arch_getGraphicsModeInfo()

static void arch_waitForNextVerticalRetrace()
{
// Wait for the ongoing Vertical Retrace to end.
while (ioread (0x3DA) & 0x8)
;

// Wait for next Vertical Retrace to start.
while (!(ioread (0x3DA) & 0x8))
;
}
Expand Down
2 changes: 2 additions & 0 deletions src/kernel/x86/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ void keventmanager_invoke()
}
}
}
#ifdef GRAPHICS_MODE_ENABLED
if (us % CONFIG_PROCESS_PERIOD_US == 0) {
kgraphis_flush();
}
#endif
}

void k_delay (UINT ms)
Expand Down

0 comments on commit a3e3f0c

Please sign in to comment.