Toggle debug output with F11

This commit is contained in:
Ry 2023-07-11 23:02:12 -07:00
parent 385f879e79
commit 4bedaa9028

View File

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