Skip to content

Commit

Permalink
changed volumes array types to avoid casting (libretro#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
eadmaster authored and eadmaster committed Dec 6, 2020
1 parent fc03c94 commit 4259c5b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions libretro/libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,9 +940,9 @@ static void config_default(void)
config.ym2612 = YM2612_DISCRETE;
config.ym2413 = 2; /* AUTO */
config.mono = 0; /* STEREO output */
memset( config.psg_ch_volumes, 100, sizeof(config.psg_ch_volumes)); /* individual channel volumes */
memset( config.md_ch_volumes, 100, sizeof(config.md_ch_volumes)); /* individual channel volumes */
memset( config.sms_fm_ch_volumes, 100, sizeof(config.sms_fm_ch_volumes)); /* individual channel volumes */
for (i = 0; i < 4; i++) config.psg_ch_volumes[i] = 100; /* individual channel volumes */
for (i = 0; i < 6; i++) config.md_ch_volumes[i] = 100; /* individual channel volumes */
for (i = 0; i < 9; i++) config.sms_fm_ch_volumes[i] = 100; /* individual channel volumes */
#ifdef HAVE_YM3438_CORE
config.ym3438 = 0;
#endif
Expand Down
38 changes: 19 additions & 19 deletions libretro/libretro_core_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_psg_channel_0_volume",
"PSG Tone Channel 0 Volume %",
"Reduces the volume of the PSG Tone Channel 0.",
"Reduce the volume of the PSG Tone Channel 0.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -622,7 +622,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_psg_channel_1_volume",
"PSG Tone Channel 1 Volume %",
"Reduces the volume of the PSG Tone Channel 1.",
"Reduce the volume of the PSG Tone Channel 1.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -642,7 +642,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_psg_channel_2_volume",
"PSG Tone Channel 2 Volume %",
"Reduces the volume of the PSG Tone Channel 2.",
"Reduce the volume of the PSG Tone Channel 2.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -662,7 +662,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_psg_channel_3_volume",
"PSG Noise Channel 3 Volume %",
"Reduces the volume of the PSG Noise Channel 3.",
"Reduce the volume of the PSG Noise Channel 3.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -682,7 +682,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_0_volume",
"Mega Drive / Genesis FM Channel 0 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 0.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 0.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -702,7 +702,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_1_volume",
"Mega Drive / Genesis FM Channel 1 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 1.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 1.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -722,7 +722,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_2_volume",
"Mega Drive / Genesis FM Channel 2 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 2.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 2.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -742,7 +742,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_3_volume",
"Mega Drive / Genesis FM Channel 3 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 3.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 3.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -762,7 +762,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_4_volume",
"Mega Drive / Genesis FM Channel 4 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 4.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 4.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -782,7 +782,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_md_channel_5_volume",
"Mega Drive / Genesis FM Channel 5 Volume %",
"Reduces the volume of the Mega Drive / Genesis FM Channel 5.",
"Reduce the volume of the Mega Drive / Genesis FM Channel 5.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -802,7 +802,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_0_volume",
"Master System FM (YM2413) Channel 0 Volume %",
"Reduces the volume of the Master System FM Channel 0.",
"Reduce the volume of the Master System FM Channel 0.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -822,7 +822,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_1_volume",
"Master System FM (YM2413) Channel 1 Volume %",
"Reduces the volume of the Master System FM Channel 1.",
"Reduce the volume of the Master System FM Channel 1.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -842,7 +842,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_2_volume",
"Master System FM (YM2413) Channel 2 Volume %",
"Reduces the volume of the Master System FM Channel 2.",
"Reduce the volume of the Master System FM Channel 2.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -862,7 +862,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_3_volume",
"Master System FM (YM2413) Channel 3 Volume %",
"Reduces the volume of the Master System FM Channel 3.",
"Reduce the volume of the Master System FM Channel 3.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -882,7 +882,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_4_volume",
"Master System FM (YM2413) Channel 4 Volume %",
"Reduces the volume of the Master System FM Channel 4.",
"Reduce the volume of the Master System FM Channel 4.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -902,7 +902,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_5_volume",
"Master System FM (YM2413) Channel 5 Volume %",
"Reduces the volume of the Master System FM Channel 5.",
"Reduce the volume of the Master System FM Channel 5.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -922,7 +922,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_6_volume",
"Master System FM (YM2413) Channel 6 Volume %",
"Reduces the volume of the Master System FM Channel 6.",
"Reduce the volume of the Master System FM Channel 6.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -942,7 +942,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_7_volume",
"Master System FM (YM2413) Channel 7 Volume %",
"Reduces the volume of the Master System FM Channel 7.",
"Reduce the volume of the Master System FM Channel 7.",
{
{ "0", NULL },
{ "10", NULL },
Expand All @@ -962,7 +962,7 @@ struct retro_core_option_definition option_defs_us[] = {
{
"genesis_plus_gx_sms_fm_channel_8_volume",
"Master System FM (YM2413) Channel 8 Volume %",
"Reduces the volume of the Master System FM Channel 8.",
"Reduce the volume of the Master System FM Channel 8.",
{
{ "0", NULL },
{ "10", NULL },
Expand Down
6 changes: 3 additions & 3 deletions libretro/osd.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ typedef struct
uint8 gun_cursor;
uint32 overclock;
uint8 no_sprite_limit;
uint8 psg_ch_volumes[4];
uint8 md_ch_volumes[6];
uint8 sms_fm_ch_volumes[9];
unsigned int psg_ch_volumes[4];
int32 md_ch_volumes[6];
signed int sms_fm_ch_volumes[9];
} t_config;

extern t_config config;
Expand Down

0 comments on commit 4259c5b

Please sign in to comment.