mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #1819 from Gymnasiast/audio-device-translatable
Make the string for 'Default audio device' translatable, fix comment
This commit is contained in:
commit
f20d1c7110
|
@ -3848,3 +3848,5 @@ STR_5506 :Guests ignore intensities
|
|||
STR_5507 :Handymen mow grass by default
|
||||
STR_5508 :Allow loading files with incorrect checksums
|
||||
STR_5509 :{SMALLFONT}{BLACK}Allows loading scenarios and saves that have an incorrect checksum, like the scenarios from the demo or damaged saves.
|
||||
STR_5510 :Default sound device
|
||||
STR_5511 :(UNKNOWN)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../config.h"
|
||||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../platform/platform.h"
|
||||
#include "../ride/ride.h"
|
||||
#include "../world/map.h"
|
||||
|
@ -69,11 +70,11 @@ void audio_get_devices()
|
|||
gAudioDeviceCount++;
|
||||
gAudioDevices = malloc(gAudioDeviceCount * sizeof(audio_device));
|
||||
|
||||
strcpy(gAudioDevices[0].name, "Default sound device");
|
||||
strcpy(gAudioDevices[0].name, language_get_string(5510));
|
||||
for (i = 1; i < gAudioDeviceCount; i++) {
|
||||
const char *utf8_name = SDL_GetAudioDeviceName(i - 1, SDL_FALSE);
|
||||
if (utf8_name == NULL)
|
||||
utf8_name = "(UNKNOWN)";
|
||||
utf8_name = language_get_string(5511);
|
||||
|
||||
strcpy(gAudioDevices[i].name, utf8_name);
|
||||
}
|
||||
|
|
|
@ -1117,7 +1117,7 @@ static void window_options_invalidate(rct_window *w)
|
|||
widget_set_checkbox_value(w, WIDX_DAY_NIGHT_CHECKBOX, gConfigGeneral.day_night_cycle);
|
||||
widget_set_checkbox_value(w, WIDX_UPPER_CASE_BANNERS_CHECKBOX, gConfigGeneral.upper_case_banners);
|
||||
|
||||
// construction marker: celsius/fahrenheit
|
||||
// construction marker: white/translucent
|
||||
window_options_display_widgets[WIDX_CONSTRUCTION_MARKER].image = STR_WHITE + RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_CONSTRUCTION_MARKER, uint8);
|
||||
|
||||
window_options_display_widgets[WIDX_RESOLUTION].type = WWT_DROPDOWN;
|
||||
|
@ -1170,7 +1170,11 @@ static void window_options_invalidate(rct_window *w)
|
|||
RCT2_GLOBAL(0x013CE952, uint16) = STR_SOUND_NONE;
|
||||
}
|
||||
else {
|
||||
if (currentSoundDevice == 0)
|
||||
RCT2_GLOBAL(0x013CE952, uint16) = 5510;
|
||||
else
|
||||
RCT2_GLOBAL(0x013CE952, uint16) = 1170;
|
||||
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint32) = (uint32)gAudioDevices[currentSoundDevice].name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue