Compile in rsound audio driver by default and make RSound

Server IP Address setting configurable by keyboard
This commit is contained in:
twinaphex 2014-03-02 07:22:19 +01:00
parent f9d21c6804
commit a8573860fa
2 changed files with 22 additions and 6 deletions

View File

@ -116,18 +116,16 @@ endif
ifeq ($(HAVE_NETPLAY), 1)
OBJ += netplay.o
#ifeq ($(HAVE_RSOUND), 1)
OBJ += audio/librsound.o audio/rsound.o
DEFINES += -DHAVE_RSOUND
#endif
endif
ifeq ($(HAVE_COMMAND), 1)
OBJ += command.o
endif
ifeq ($(HAVE_RSOUND), 1)
OBJ += audio/rsound.o
DEFINES += $(RSOUND_CFLAGS)
LIBS += $(RSOUND_LIBS)
endif
ifeq ($(HAVE_OSS), 1)
OBJ += audio/oss.o
endif

View File

@ -314,6 +314,20 @@ int menu_settings_toggle_setting(void *data, unsigned setting, unsigned action,
return menu_set_settings(rgui, setting, action);
}
static void rsound_ipaddress_callback(void *userdata, const char *str)
{
rgui_handle_t *rgui = (rgui_handle_t*)userdata;
if (str && *str)
{
strlcpy(g_settings.audio.device, str, sizeof(g_settings.audio.device));
}
rgui->keyboard.display = false;
rgui->keyboard.label = NULL;
rgui->old_input_state = -1ULL; // Avoid triggering states on pressing return.
g_extern.system.key_event = menu_key_event;
}
#ifdef HAVE_OSK
static bool osk_callback_enter_rsound(void *data)
{
@ -1643,6 +1657,10 @@ int menu_set_settings(void *data, unsigned setting, unsigned action)
else
#endif
{
g_extern.system.key_event = NULL;
rgui->keyboard.display = true;
rgui->keyboard.label = "Server IP Address: ";
rgui->keyboard.buffer = input_keyboard_start_line(rgui, rsound_ipaddress_callback);
}
}
#endif