add system time, clean up pci into pci.sys, clean up syscall names, fix USERAPC1 typo
This commit is contained in:
1 parent
c1a291c4c9
commit
e41bf6e2c0
64 files changed
+4514
-2220
No files matched your search
@@ -81,7 +81,7 @@ static void update_screen_size(void) {
|
||||
int oldCols = gCols;
|
||||
int oldRows = gRows;
|
||||
|
||||
if (SysScreenGetSize(&pxW, &pxH) == 0 && pxW > 0 && pxH > 0) {
|
||||
if (SysGetScreenSize(&pxW, &pxH) == 0 && pxW > 0 && pxH > 0) {
|
||||
gCols = pxW / GLYPH_W;
|
||||
gRows = pxH / GLYPH_H;
|
||||
|
||||
@@ -111,7 +111,7 @@ static void put_cell(int col, int row, char c, uint32_t fg, uint32_t bg) {
|
||||
cell->bg = bg;
|
||||
}
|
||||
|
||||
SysScreenPutChar(c, col * GLYPH_W, row * GLYPH_H, fg, bg);
|
||||
SysPutScreenChar(c, col * GLYPH_W, row * GLYPH_H, fg, bg);
|
||||
}
|
||||
|
||||
static void clear_row(int row, uint32_t bg) {
|
||||
@@ -473,8 +473,8 @@ static void editor_loop(void) {
|
||||
while (true) {
|
||||
render();
|
||||
|
||||
INPUT_KEY key = SysKbReadKey();
|
||||
uint32_t mods = SysKbGetModifiers();
|
||||
INPUT_KEY key = SysReadKey();
|
||||
uint32_t mods = SysGetKeyModifiers();
|
||||
bool ctrl = (mods & INPUT_MOD_CTRL) != 0;
|
||||
|
||||
if (ctrl && key == EDIT_KEY_Q) {
|
||||
@@ -535,10 +535,10 @@ static void print(const char* s) {
|
||||
int main(void) {
|
||||
parse_filename_from_cmdline();
|
||||
load_file();
|
||||
SysScreenClear(COL_BG);
|
||||
SysClearScreen(COL_BG);
|
||||
invalidate_screen_cache();
|
||||
editor_loop();
|
||||
SysScreenClear(0x012456);
|
||||
SysClearScreen(0x012456);
|
||||
invalidate_screen_cache();
|
||||
print("edit: goodbye\n");
|
||||
SysExitProcess(0);
|
||||
|
||||
Reference in new issue
Block a user