mirror of
https://github.com/libretro/RetroArch
synced 2025-03-22 16:20:58 +00:00
Removed C99 styled literals.
This commit is contained in:
parent
8c2135f2bb
commit
1223f74f5c
32
retroarch.c
32
retroarch.c
@ -16441,7 +16441,7 @@ void input_keyboard_event(bool down, unsigned code,
|
|||||||
{
|
{
|
||||||
if (code != 303 && code != 0)
|
if (code != 303 && code != 0)
|
||||||
{
|
{
|
||||||
char* say_char = malloc(sizeof(char));
|
char* say_char = (char*) malloc(sizeof(char)+1);
|
||||||
if (say_char != NULL)
|
if (say_char != NULL)
|
||||||
{
|
{
|
||||||
char c = (char) character;
|
char c = (char) character;
|
||||||
@ -29048,6 +29048,7 @@ static bool accessibility_speak_macos(
|
|||||||
char* speed_out = malloc(4);
|
char* speed_out = malloc(4);
|
||||||
|
|
||||||
char* speeds[10] = {"80", "100", "125", "150", "170", "210", "260", "310", "380", "450"};
|
char* speeds[10] = {"80", "100", "125", "150", "170", "210", "260", "310", "380", "450"};
|
||||||
|
settings_t *settings = configuration_settings;
|
||||||
int speed = settings->uints.accessibility_narrator_speech_speed;
|
int speed = settings->uints.accessibility_narrator_speech_speed;
|
||||||
|
|
||||||
if (speed < 1)
|
if (speed < 1)
|
||||||
@ -29064,7 +29065,7 @@ static bool accessibility_speak_macos(
|
|||||||
|
|
||||||
if (speak_pid > 0)
|
if (speak_pid > 0)
|
||||||
{
|
{
|
||||||
/* Kill the running espeak */
|
/* Kill the running say */
|
||||||
kill(speak_pid, SIGTERM);
|
kill(speak_pid, SIGTERM);
|
||||||
speak_pid = 0;
|
speak_pid = 0;
|
||||||
}
|
}
|
||||||
@ -29086,12 +29087,23 @@ static bool accessibility_speak_macos(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* child process: replace process with the espeak command */
|
/* child process: replace process with the say command */
|
||||||
if (strlen(language_speaker)> 0)
|
if (strlen(language_speaker)> 0)
|
||||||
execvp("say", (char* []) {"say", "-v", language_speaker,
|
{
|
||||||
speak_text, "-r", speed_out, NULL});
|
char* cmd[] = {"say", "-v", NULL,
|
||||||
|
NULL, "-r", NULL, NULL};
|
||||||
|
cmd[2] = language_speaker;
|
||||||
|
cmd[3] = speak_text;
|
||||||
|
cmd[5] = speed_out;
|
||||||
|
execvp("say", cmd);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
execvp("say", (char* []) {"say", speak_text, "-r", speed_out, NULL});
|
{
|
||||||
|
char* cmd[] = {"say", NULL, "-r", NULL, NULL};
|
||||||
|
cmd[1] = speak_text;
|
||||||
|
cmd[3] = speed_out;
|
||||||
|
execvp("say",cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -29276,7 +29288,7 @@ bool accessibility_speak_linux(
|
|||||||
|
|
||||||
strlcpy(speed_out, "-s", 3);
|
strlcpy(speed_out, "-s", 3);
|
||||||
strlcat(speed_out, speeds[speed-1], 6);
|
strlcat(speed_out, speeds[speed-1], 6);
|
||||||
RARCH_LOG("SSS %s\n", speed_out);
|
|
||||||
if (priority < 10 && speak_pid > 0)
|
if (priority < 10 && speak_pid > 0)
|
||||||
{
|
{
|
||||||
/* check if old pid is running */
|
/* check if old pid is running */
|
||||||
@ -29309,7 +29321,11 @@ bool accessibility_speak_linux(
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* child process: replace process with the espeak command */
|
/* child process: replace process with the espeak command */
|
||||||
execvp("espeak", (char* []) {"espeak", voice_out,speed_out, speak_text, NULL});
|
char* cmd[] = {"espeak", NULL, NULL, NULL, NULL};
|
||||||
|
cmd[1] = voice_out;
|
||||||
|
cmd[2] = speed_out;
|
||||||
|
cmd[3] = speak_text;
|
||||||
|
execvp("espeak", cmd);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user