[client] main: move micDefaultState into g_state

This commit is contained in:
Quantum 2022-06-01 22:50:42 -04:00 committed by Geoffrey McRae
parent 9dee9ed7bb
commit ae38db4915
3 changed files with 6 additions and 2 deletions

View File

@ -814,9 +814,9 @@ void audio_recordStart(int channels, int sampleRate, PSAudioFormat format)
if (audio.record.started) if (audio.record.started)
realRecordStart(channels, sampleRate, format); realRecordStart(channels, sampleRate, format);
else if (g_params.micDefaultState == MIC_DEFAULT_DENY) else if (g_state.micDefaultState == MIC_DEFAULT_DENY)
DEBUG_INFO("Microphone access denied by default"); DEBUG_INFO("Microphone access denied by default");
else if (g_params.micDefaultState == MIC_DEFAULT_ALLOW) else if (g_state.micDefaultState == MIC_DEFAULT_ALLOW)
{ {
DEBUG_INFO("Microphone access granted by default"); DEBUG_INFO("Microphone access granted by default");
realRecordStart(channels, sampleRate, format); realRecordStart(channels, sampleRate, format);

View File

@ -1234,6 +1234,8 @@ static int lg_run(void)
}; };
purespice_init(&psInit); purespice_init(&psInit);
g_state.micDefaultState = g_params.micDefaultState;
if (g_params.useSpiceInput || if (g_params.useSpiceInput ||
g_params.useSpiceClipboard || g_params.useSpiceClipboard ||
g_params.useSpiceAudio) g_params.useSpiceAudio)

View File

@ -147,6 +147,8 @@ struct AppState
bool resizeDone; bool resizeDone;
bool autoIdleInhibitState; bool autoIdleInhibitState;
enum MicDefaultState micDefaultState;
}; };
struct AppParams struct AppParams