diff options
author | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-24 20:58:06 +0100 |
---|---|---|
committer | Manuel Palenzuela <manuelpalenzuelamerino@gmail.com> | 2021-07-24 20:58:06 +0100 |
commit | 5d8e1534937fefdf557dbde091a4bbfb34d603f1 (patch) | |
tree | 85b5cf473bd0209ad15762760ec5de6594d4d6ac /emulator.h | |
parent | Feature: Implemented various instructions and added a few roms (diff) | |
download | CHIP8-Emulator-5d8e1534937fefdf557dbde091a4bbfb34d603f1.tar.gz CHIP8-Emulator-5d8e1534937fefdf557dbde091a4bbfb34d603f1.tar.bz2 CHIP8-Emulator-5d8e1534937fefdf557dbde091a4bbfb34d603f1.zip |
Misc: Added the timer thread variable to the emulator struct
This way we can keep track of the thread to join it on emulator_deinitialise()
Diffstat (limited to 'emulator.h')
-rw-r--r-- | emulator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/emulator.h b/emulator.h index fa455d9..2df3665 100644 --- a/emulator.h +++ b/emulator.h @@ -54,6 +54,7 @@ typedef struct volatile uint8_t draw_flag; volatile uint8_t delay_timer; volatile uint8_t sound_timer; + pthread_t timers_thread; uint8_t display[64][32]; Key keys[16]; Registers regs; @@ -64,6 +65,7 @@ typedef struct } Emulator; int emulator_initialise(Emulator* emulator); +int emulator_deinitialise(Emulator* emulator); int emulator_load_rom(Emulator* emulator, char* rom_name); int emulator_tick(Emulator* emulator); void emulator_step(Emulator* emulator); |