Hook fake mic in cli frontend: use m to toggle.

This commit is contained in:
riccardom 2009-06-17 17:23:52 +00:00
parent a2b08efbd7
commit 7ca7824ebf
1 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,7 @@
#include "../render3D.h" #include "../render3D.h"
#include "../rasterize.h" #include "../rasterize.h"
#include "../saves.h" #include "../saves.h"
#include "../mic.h"
#ifdef GDB_STUB #ifdef GDB_STUB
#include "../gdbstub.h" #include "../gdbstub.h"
#endif #endif
@ -101,6 +102,7 @@ const char * save_type_names[] = {
/* Our keyboard config is different because of the directional keys */ /* 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] = const u16 cli_kb_cfg[NB_KEYS] =
{ {
SDLK_x, // A SDLK_x, // A
@ -119,6 +121,8 @@ const u16 cli_kb_cfg[NB_KEYS] =
SDLK_o // BOOST SDLK_o // BOOST
}; };
static BOOL enable_fake_mic;
struct my_config { struct my_config {
int load_slot; int load_slot;
u16 arm9_gdb_port; u16 arm9_gdb_port;
@ -681,6 +685,10 @@ static void desmume_cycle(int *sdl_quit, struct my_config * my_config)
case SDLK_ESCAPE: case SDLK_ESCAPE:
*sdl_quit = 1; *sdl_quit = 1;
break; break;
case SDLK_m:
enable_fake_mic = !enable_fake_mic;
Mic_DoNoise(enable_fake_mic);
break;
default: default:
break; break;
} }