From 7ca7824ebf788fcc2884b937acca698978c2023e Mon Sep 17 00:00:00 2001 From: riccardom Date: Wed, 17 Jun 2009 17:23:52 +0000 Subject: [PATCH] Hook fake mic in cli frontend: use m to toggle. --- desmume/src/cli/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/desmume/src/cli/main.cpp b/desmume/src/cli/main.cpp index c26b3b12b..3b4316c95 100644 --- a/desmume/src/cli/main.cpp +++ b/desmume/src/cli/main.cpp @@ -53,6 +53,7 @@ #include "../render3D.h" #include "../rasterize.h" #include "../saves.h" +#include "../mic.h" #ifdef GDB_STUB #include "../gdbstub.h" #endif @@ -101,6 +102,7 @@ const char * save_type_names[] = { /* Our keyboard config is different because of the directional keys */ +/* Please note that m is used for fake microphone */ const u16 cli_kb_cfg[NB_KEYS] = { SDLK_x, // A @@ -119,6 +121,8 @@ const u16 cli_kb_cfg[NB_KEYS] = SDLK_o // BOOST }; +static BOOL enable_fake_mic; + struct my_config { int load_slot; u16 arm9_gdb_port; @@ -681,6 +685,10 @@ static void desmume_cycle(int *sdl_quit, struct my_config * my_config) case SDLK_ESCAPE: *sdl_quit = 1; break; + case SDLK_m: + enable_fake_mic = !enable_fake_mic; + Mic_DoNoise(enable_fake_mic); + break; default: break; }