fixed compilation issues

tiny GUI modifications
This commit is contained in:
ekeeke31 2010-03-07 17:56:02 +00:00
parent ed11eb0133
commit 0f4da285f8
8 changed files with 48 additions and 7 deletions

View File

@ -26,7 +26,7 @@ INCLUDES := source source/m68k source/z80 source/sound source/ntsc source/cart_h
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-strict-aliasing $(MACHDEP) $(INCLUDE) -DWORDS_BIGENDIAN -DNGC="1" -DHW_DOL
CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-strict-aliasing $(MACHDEP) $(INCLUDE) -DWORDS_BIGENDIAN -DNGC -DHW_DOL
CXXFLAGS = $(CFLAGS)
LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map

View File

@ -26,7 +26,7 @@ INCLUDES := source source/m68k source/z80 source/sound source/ntsc source/cart_h
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -O3 -g -fomit-frame-pointer -mrvl -Wall $(MACHDEP) -Wno-strict-aliasing $(INCLUDE) -DWORDS_BIGENDIAN -DNGC="1" -DHW_RVL
CFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-strict-aliasing $(MACHDEP) $(INCLUDE) -DWORDS_BIGENDIAN -DNGC -DHW_RVL
CXXFLAGS = $(CFLAGS)
LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map

View File

@ -1278,8 +1278,8 @@ void GUI_OptionBox(gui_menu *parent, optioncallback cb, char *title, void *optio
else
{
/* float type */
if (*(float *)option < 0.0) sprintf(msg,"-%1.3f",fabs(*(float *)option));
else sprintf(msg,"%1.3f",fabs(*(float *)option));
if (*(float *)option < 0.0) sprintf(msg,"-%1.2f",fabs(*(float *)option));
else sprintf(msg,"%1.2f",fabs(*(float *)option));
}
/* draw option text */

View File

@ -705,11 +705,12 @@ static int update_snd_items(void)
int offset;
float fm_volume = (float)config.fm_preamp/100.0;
float psg_volume = (float)config.psg_preamp/100.0;
float rolloff = config.rolloff * 100.0;
if (config.hq_fm)
{
sprintf (items[0].text, "High-Quality FM: ON");
sprintf (items[1].text, "FM Roll-off: %1.3f",config.rolloff);
sprintf (items[1].text, "FM Roll-off: %1.2f %%",rolloff);
strcpy (items[1].comment, "Adjust FIR low-pass filtering");
offset = 2;
}
@ -783,6 +784,7 @@ static void soundmenu ()
gui_item *items = m->items;
float fm_volume = (float)config.fm_preamp/100.0;
float psg_volume = (float)config.psg_preamp/100.0;
float rolloff = config.rolloff * 100.0;
int offset = update_snd_items();
GUI_InitMenu(m);
GUI_SlideMenuTitle(m,strlen("Audio "));
@ -796,8 +798,9 @@ static void soundmenu ()
{
if (ret == 1)
{
GUI_OptionBox(m,0,"FM Roll-off",(void *)&config.rolloff,0.001,0.800,1.000,0);
sprintf (items[1].text, "FM Roll-off: %1.3f",config.rolloff);
GUI_OptionBox(m,0,"FM Roll-off",(void *)&rolloff,0.1,95.0,99.9,0);
sprintf (items[1].text, "FM Roll-off: %1.2f %%",rolloff);
config.rolloff = rolloff / 100.0;
ret = 255;
if (cart.romsize)
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -17,6 +17,7 @@
#ifdef HW_RVL
#include <di/di.h>
#include "vi_encoder.h"
#endif
#include "gx_input.h"

View File

@ -28,6 +28,8 @@
#include <ogcsys.h>
#include <ogc/machine/processor.h>
#include "vi_encoder.h"
/****************************************************************************
* I2C driver by Hector Martin (marcan)
*

View File

@ -23,7 +23,42 @@
***************************************************************************/
#if defined(HW_RVL)
typedef enum
{
VI_GM_0_1=1,
VI_GM_0_2,
VI_GM_0_3,
VI_GM_0_4,
VI_GM_0_5,
VI_GM_0_6,
VI_GM_0_7,
VI_GM_0_8,
VI_GM_0_9,
VI_GM_1_0,
VI_GM_1_1,
VI_GM_1_2,
VI_GM_1_3,
VI_GM_1_4,
VI_GM_1_5,
VI_GM_1_6,
VI_GM_1_7,
VI_GM_1_8,
VI_GM_1_9,
VI_GM_2_0,
VI_GM_2_1,
VI_GM_2_2,
VI_GM_2_3,
VI_GM_2_4,
VI_GM_2_5,
VI_GM_2_6,
VI_GM_2_7,
VI_GM_2_8,
VI_GM_2_9,
VI_GM_3_0
} VIGamma;
extern void VIDEO_SetGamma(VIGamma gamma);
extern void VIDEO_SetTrapFilter(bool enable);
#endif