You are browsing as a guest. Sign up (or log in) to start making projects!

8h 35m 5s logged

Refactored the platform layer

The whole platform layer was just one file until now. Since I did a lot of work on it recently, it grew to over 2400 lines of code. It was super confusing and disorienting. So I decided to refactor it (split it) into 8 files, based on what they handle:

  • console.h - saving/restoring terminal state
  • control.h - termination signal handling
  • file.h - file operations (64bit)
  • input_reader.h - handling input (not parsing, that is it’s own file)
  • shared_memory.h - shared memory handling for the kitty protocol
  • terminal_io.h - writes output to the terminal
  • terminal_query.h - querying the terminal for things like graphics capability, etc.
  • timing.h - frame timing and sleeps
0
46

Comments 0

No comments yet. Be the first!