Made leds for 320X240 resolution a bit lower

This commit is contained in:
fabio.olimpieri 2014-11-17 10:57:55 +00:00
parent fcd768e42f
commit 408779bd33
2 changed files with 9 additions and 6 deletions

View File

@ -171,7 +171,7 @@ COMMON_FLAGS := -g -O3 $(MACHDEP) -Wall -W -Wno-unused -Wno-format -Wno-sign-com
INCLUDES := -Isrc/md-generic/ -Isrc/include -Isrc -I$(DEVKITPRO)/libogc/include -I$(DEVKITPRO)/libogc/include/SDL -I$(PORTLIBS)/include
DEFINES := -DOS_WITHOUT_MEMORY_MANAGEMENT -DSAVESTATE -DUSE_SDL -DSUPPORT_THREADS -DCPUEMU_0 -DCPUEMU_5 -DCPUEMU_6 \
-DFPUEMU -DAGA -DAUTOCONFIG -DFILESYS \
-DTD_START_HEIGHT=20 -DDRIVESOUND -DREGPARAM=
-DTD_START_HEIGHT=16 -DDRIVESOUND -DREGPARAM=
CFLAGS := $(COMMON_FLAGS) $(INCLUDES) $(DEFINES)
#unused defines: -DCAPS (to enable ipf file) -DFDI2RAW (to enable DFI file)

View File

@ -1638,12 +1638,14 @@ static int td_pos = (TD_RIGHT|TD_BOTTOM);
# define TD_START_HEIGHT 0
#endif
#define TD_TOTAL_HEIGHT (TD_PADY + TD_NUM_HEIGHT + TD_START_HEIGHT)
#define TD_TOTAL_HEIGHT (TD_PADY*2 + TD_NUM_HEIGHT + TD_START_HEIGHT)
#define NUMBERS_NUM 14
#define TD_BORDER 0x333
int td_total_height_offset = 0; //For GEKKO 320X240 resolution
static const char *numbers = { /* ugly 0123456789CHD% */
"+++++++--++++-+++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++-++++----++---+"
"+xxxxx+--+xx+-+xxxxx++xxxxx++x+-+x++xxxxx++xxxxx++xxxxx++xxxxx++xxxxx++xxxx+-+x++x+-+xxx++-+xx+-+x"
@ -1703,7 +1705,7 @@ static void draw_status_line (int line)
else
x_start = TD_PADX;
y = line - (gfxvidinfo.height - TD_TOTAL_HEIGHT);
y = line - (gfxvidinfo.height - TD_TOTAL_HEIGHT) - td_total_height_offset;
xlinebuffer = gfxvidinfo.linemem;
if (xlinebuffer == 0)
xlinebuffer = row_map[line];
@ -1770,7 +1772,7 @@ static void draw_status_line (int line)
am = 3;
}
c = xcolors[on ? on_rgb : off_rgb];
if (y == 0 || y == TD_TOTAL_HEIGHT - 1)
if (y == 0 || y == TD_TOTAL_HEIGHT - 1 - td_total_height_offset)
c = xcolors[TD_BORDER];
x = x_start + pos * TD_WIDTH;
@ -1833,8 +1835,9 @@ void finish_drawing_frame (void)
pfield_draw_line (line, where, amiga2aspect_line_map[i1 + 1]);
}
if (currprefs.leds_on_screen) {
int line = gfxvidinfo.height - TD_TOTAL_HEIGHT;
for (i = TD_TOTAL_HEIGHT; i--; line++) {
if (currprefs.gfx_width_win == 640) td_total_height_offset = 0; else td_total_height_offset = 9;
int line = gfxvidinfo.height - TD_TOTAL_HEIGHT + td_total_height_offset;
for (i = TD_TOTAL_HEIGHT- td_total_height_offset; i--; line++) {
draw_status_line (line);
do_flush_line (line);
}