mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 14:28:47 +00:00
(PS3) Preliminary rsound patches
This commit is contained in:
parent
a9eaa86683
commit
bdba331096
@ -724,7 +724,9 @@ bool rarch_console_rsound_start(const char *ip)
|
||||
|
||||
void rarch_console_rsound_stop(void)
|
||||
{
|
||||
const char *default_audio = config_get_default_audio();
|
||||
uninit_audio();
|
||||
strlcpy(g_settings.audio.driver, default_audio, sizeof(g_settings.audio.driver));
|
||||
init_drivers_pre();
|
||||
init_audio();
|
||||
}
|
||||
|
@ -225,7 +225,6 @@ struct console_settings
|
||||
char cgp_path[PATH_MAX];
|
||||
char input_cfg_path[PATH_MAX];
|
||||
char rom_path[PATH_MAX];
|
||||
char rsound_ip_address[PATH_MAX];
|
||||
char default_rom_startup_dir[PATH_MAX];
|
||||
char default_savestate_dir[PATH_MAX];
|
||||
char default_sram_dir[PATH_MAX];
|
||||
|
@ -145,7 +145,6 @@ static void set_default_settings(void)
|
||||
g_console.custom_viewport_height = 0;
|
||||
g_console.custom_viewport_x = 0;
|
||||
g_console.custom_viewport_y = 0;
|
||||
strlcpy(g_console.rsound_ip_address, "0.0.0.0", sizeof(g_console.rsound_ip_address));
|
||||
g_console.custom_bgm_enable = true;
|
||||
|
||||
// g_extern
|
||||
@ -212,6 +211,7 @@ static void init_settings(bool load_libretro_path)
|
||||
CONFIG_GET_BOOL(video.smooth, "video_smooth");
|
||||
CONFIG_GET_BOOL(video.vsync, "video_vsync");
|
||||
CONFIG_GET_FLOAT(video.aspect_ratio, "video_aspect_ratio");
|
||||
CONFIG_GET_STRING(audio.device, "audio_device");
|
||||
|
||||
for (unsigned i = 0; i < 7; i++)
|
||||
{
|
||||
@ -275,6 +275,7 @@ static void save_settings(void)
|
||||
config_set_bool(conf, "video_second_pass_smooth", g_settings.video.second_pass_smooth);
|
||||
config_set_bool(conf, "video_smooth", g_settings.video.smooth);
|
||||
config_set_bool(conf, "video_vsync", g_settings.video.vsync);
|
||||
config_set_string(conf, "audio_device", g_settings.audio.device);
|
||||
|
||||
for (unsigned i = 0; i < 7; i++)
|
||||
{
|
||||
|
23
ps3/menu.c
23
ps3/menu.c
@ -552,12 +552,12 @@ static void set_setting_label(menu * menu_obj, uint64_t currentsetting)
|
||||
}
|
||||
break;
|
||||
case SETTING_RSOUND_SERVER_IP_ADDRESS:
|
||||
if(strcmp(g_console.rsound_ip_address,"0.0.0.0") == 0)
|
||||
if(strcmp(g_settings.audio.device,"0.0.0.0") == 0)
|
||||
menu_obj->items[currentsetting].text_color = GREEN;
|
||||
else
|
||||
menu_obj->items[currentsetting].text_color = ORANGE;
|
||||
|
||||
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), g_console.rsound_ip_address);
|
||||
snprintf(menu_obj->items[currentsetting].setting_text, sizeof(menu_obj->items[currentsetting].setting_text), g_settings.audio.device);
|
||||
break;
|
||||
case SETTING_DEFAULT_AUDIO_ALL:
|
||||
break;
|
||||
@ -1500,7 +1500,6 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
if(g_console.sound_mode != SOUND_MODE_NORMAL)
|
||||
{
|
||||
g_console.sound_mode--;
|
||||
//emulator_toggle_sound(g_console.sound_mode);
|
||||
set_delay = DELAY_MEDIUM;
|
||||
}
|
||||
}
|
||||
@ -1509,14 +1508,24 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
if(g_console.sound_mode < SOUND_MODE_HEADSET)
|
||||
{
|
||||
g_console.sound_mode++;
|
||||
//emulator_toggle_sound(g_console.sound_mode);
|
||||
set_delay = DELAY_MEDIUM;
|
||||
}
|
||||
}
|
||||
if(CTRL_UP(state) || CTRL_LSTICK_UP(state) || CTRL_DOWN(state) || CTRL_LSTICK_DOWN(state))
|
||||
{
|
||||
if(g_console.sound_mode != SOUND_MODE_RSOUND)
|
||||
{
|
||||
rarch_console_rsound_stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
rarch_console_rsound_start(g_settings.audio.device);
|
||||
}
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
{
|
||||
g_console.sound_mode = SOUND_MODE_NORMAL;
|
||||
//emulator_toggle_sound(g_console.sound_mode);
|
||||
rarch_console_rsound_stop();
|
||||
set_delay = DELAY_MEDIUM;
|
||||
}
|
||||
break;
|
||||
@ -1534,10 +1543,10 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
||||
}
|
||||
|
||||
if(g_console.oskutil_handle.text_can_be_fetched)
|
||||
strcpy(g_console.rsound_ip_address, OUTPUT_TEXT_STRING(g_console.oskutil_handle));
|
||||
strcpy(g_settings.audio.device, OUTPUT_TEXT_STRING(g_console.oskutil_handle));
|
||||
}
|
||||
if(CTRL_START(state))
|
||||
strcpy(g_console.rsound_ip_address, "0.0.0.0");
|
||||
strcpy(g_settings.audio.device, "0.0.0.0");
|
||||
break;
|
||||
case SETTING_DEFAULT_AUDIO_ALL:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user