Toggle debug output with F11

main
Ry 2023-07-11 23:02:12 -07:00
parent 385f879e79
commit 4bedaa9028
1 changed files with 4 additions and 0 deletions

View File

@ -8,8 +8,11 @@
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include "keyboard.h"
extern fox32_vm_t vm;
typedef struct node_s {
struct node_s *prev;
struct node_s *next;
@ -150,6 +153,7 @@ keycode_t key_convert(int sdlcode) {
}
void key_pressed(int sdlcode) {
if (sdlcode == SDL_SCANCODE_F11) vm.debug = !vm.debug;
keycode_t code = key_convert(sdlcode);
if (code) key_put(code);
}