if (i == dip_for_drawing->last_color_change)
nextpos = endpos;
else
- nextpos = coord_hw_to_window_x (curr_color_changes[i].linepos);
+ nextpos = shres_coord_hw_to_window_x (curr_color_changes[i].linepos);
nextpos_in_range = nextpos;
if (nextpos > endpos)
if (currprefs.leds_on_screen && ((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !(currprefs.leds_on_screen & STATUSLINE_TARGET))) {
int slx, sly;
- statusline_getpos(&slx, &sly, vb->outwidth, vb->outheight);
+ statusline_getpos(&slx, &sly, vb->outwidth, vb->outheight, 1, 1);
statusbar_y1 = sly + min_ypos_for_screen - 1;
statusbar_y2 = statusbar_y1 + TD_TOTAL_HEIGHT + 1;
draw_status_line(sly, -1);
extern void draw_status_line_single (uae_u8 *buf, int bpp, int y, int totalwidth, uae_u32 *rc, uae_u32 *gc, uae_u32 *bc, uae_u32 *alpha);
extern void statusline_single_erase(uae_u8 *buf, int bpp, int y, int totalwidth);
-extern void statusline_getpos(int *x, int *y, int width, int height);
+extern void statusline_getpos(int *x, int *y, int width, int height, int hx, int vx);
#define STATUSTYPE_FLOPPY 1
#define STATUSTYPE_DISPLAY 2
static int resetcount;
static double cursor_x, cursor_y;
static bool cursor_v, cursor_scale;
+static int statusbar_vx = 1, statusbar_hx = 1;
#define NUMVERTICES 8
#define D3DFVF_TLVERTEX D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1
HRESULT hr;
static uae_u32 rc[256], gc[256], bc[256], a[256];
static int done;
- int i, y;
if (!done) {
- for (i = 0; i < 256; i++) {
+ for (int i = 0; i < 256; i++) {
rc[i] = i << 16;
gc[i] = i << 8;
bc[i] = i << 0;
write_log (_T("%d: SL LockRect failed: %s\n"), D3DHEAD, D3D_ErrorString (hr));
return;
}
- for (y = 0; y < TD_TOTAL_HEIGHT; y++) {
+
+ for (int y = 0; y < TD_TOTAL_HEIGHT * statusbar_vx; y++) {
uae_u8 *buf = (uae_u8*)locked.pBits + y * locked.Pitch;
- statusline_single_erase(buf, 32 / 8, y, ledwidth);
+ statusline_single_erase(buf, 32 / 8, y, ledwidth * statusbar_hx);
}
statusline_render((uae_u8*)locked.pBits, 32 / 8, locked.Pitch, ledwidth, ledheight, rc, gc, bc, a);
- for (y = 0; y < TD_TOTAL_HEIGHT; y++) {
- uae_u8 *buf = (uae_u8*)locked.pBits + y * locked.Pitch;
+
+ int y = 0;
+ for (int yy = 0; yy < statusbar_vx * TD_TOTAL_HEIGHT; yy++) {
+ uae_u8 *buf = (uae_u8*)locked.pBits + yy * locked.Pitch;
draw_status_line_single (buf, 32 / 8, y, ledwidth, rc, gc, bc, a);
+ if ((yy % statusbar_vx) == 0)
+ y++;
}
+
ledtexture->UnlockRect (0);
}
{
ledwidth = window_w;
ledheight = TD_TOTAL_HEIGHT;
- ledtexture = createtext (ledwidth, ledheight, D3DFMT_A8R8G8B8);
+ ledtexture = createtext (ledwidth * statusbar_hx, ledheight * statusbar_vx, D3DFMT_A8R8G8B8);
if (!ledtexture)
return 0;
return 1;
}
if (ledtexture && (((currprefs.leds_on_screen & STATUSLINE_RTG) && WIN32GFX_IsPicassoScreen ()) || ((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !WIN32GFX_IsPicassoScreen ()))) {
int slx, sly;
- statusline_getpos (&slx, &sly, window_w, window_h);
+ statusline_getpos (&slx, &sly, window_w, window_h, statusbar_hx, statusbar_vx);
v.x = slx;
v.y = sly;
v.z = 0;
if (dst_width > picasso_vidinfo.width)
dst_width = picasso_vidinfo.width;
pitch = picasso_vidinfo.rowbytes;
- statusline_getpos (&slx, &sly, picasso96_state.Width, dst_height);
+ statusline_getpos (&slx, &sly, picasso96_state.Width, dst_height, 1, 1);
if (currprefs.gfx_api)
statusline_render(dst + sly * pitch, picasso_vidinfo.pixbytes, pitch, dst_width, dst_height, p96rc, p96gc, p96bc, NULL);
yy = 0;
if (!(currprefs.leds_on_screen & STATUSLINE_CHIPSET) || !tempsurf)
return;
- statusline_getpos (&slx, &sly, dst_width, dst_height);
+ statusline_getpos (&slx, &sly, dst_width, dst_height, 1, 1);
lx = dst_width;
ly = dst_height;
SetRect (&sr, slx, 0, slx + lx, TD_TOTAL_HEIGHT);
* Some code to put status information on the screen.
*/
-void statusline_getpos (int *x, int *y, int width, int height)
+void statusline_getpos (int *x, int *y, int width, int height, int hx, int vx)
{
+ int total_height = TD_TOTAL_HEIGHT * vx;
if (currprefs.osd_pos.x >= 20000) {
if (currprefs.osd_pos.x >= 30000)
*y = width * (currprefs.osd_pos.x - 30000) / 1000;
}
if (currprefs.osd_pos.y >= 20000) {
if (currprefs.osd_pos.y >= 30000)
- *y = (height - TD_TOTAL_HEIGHT) * (currprefs.osd_pos.y - 30000) / 1000;
+ *y = (height - total_height) * (currprefs.osd_pos.y - 30000) / 1000;
else
- *y = (height - TD_TOTAL_HEIGHT) - ((height - TD_TOTAL_HEIGHT) * (30000 - currprefs.osd_pos.y) / 1000);
+ *y = (height - total_height) - ((height - total_height) * (30000 - currprefs.osd_pos.y) / 1000);
} else {
if (currprefs.osd_pos.y >= 0)
- *y = height - TD_TOTAL_HEIGHT - currprefs.osd_pos.y;
+ *y = height - total_height - currprefs.osd_pos.y;
else
*y = -currprefs.osd_pos.y + 1;
}