]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Statusline d3d/software mode switch update.
authorToni Wilen <twilen@winuae.net>
Tue, 12 Jun 2018 17:36:32 +0000 (20:36 +0300)
committerToni Wilen <twilen@winuae.net>
Tue, 12 Jun 2018 17:36:32 +0000 (20:36 +0300)
drawing.cpp
framebufferboards.cpp
gfxboard.cpp
include/statusline.h
mame/a2410.cpp
od-win32/picasso96_win.cpp
od-win32/statusline_win32.cpp

index 329f1ba5c38f2c556e7a2c5f9ef15e87174cceec..afae7f391108f71aa81e0d4b60135e1621288fa2 100644 (file)
@@ -3674,7 +3674,7 @@ static void draw_frame2(struct vidbuffer *vbin, struct vidbuffer *vbout)
 
 static void draw_frame_extras(struct vidbuffer *vb, int y_start, int y_end)
 {
-       if (currprefs.leds_on_screen && ((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && !(currprefs.leds_on_screen & STATUSLINE_TARGET))) {
+       if ((currprefs.leds_on_screen & STATUSLINE_CHIPSET) && softstatusline()) {
                int slx, sly;
                statusline_getpos(vb->monitor_id, &slx, &sly, vb->outwidth, vb->outheight, 1, 1);
                statusbar_y1 = sly + min_ypos_for_screen - 1;
@@ -3992,8 +3992,11 @@ void redraw_frame(void)
 {
        last_drawn_line = 0;
        first_drawn_line = 32767;
+       // do not do full refresh if lagless mode
+       // because last line would appear as bright line
+       if (isvsync_chipset() < 0)
+               return;
        finish_drawing_frame(true);
-       //flush_screen (vidinfo->inbuffer, 0, 0);
 }
 
 void full_redraw_all(void)
index 2c73de069c9fcdd1628012b24626d49ccf430765..7a19064ed06f296832caf2434a70b7cc65179a64 100644 (file)
@@ -74,7 +74,7 @@ static bool fb_get_surface(struct fb_struct *data)
                        gotsurf = true;
                }
                if (data->surface && gotsurf) {
-                       if (!(currprefs.leds_on_screen & STATUSLINE_TARGET))
+                       if (softstatusline())
                                picasso_statusline(data->monitor_id, data->surface);
                }
        }
index a0c0ee6c0848784883dd5b40efe126f2fdad99db..acd64e8e1884eabeb1594faddff79deee438e73e 100644 (file)
@@ -1026,7 +1026,7 @@ void gfxboard_vsync_handler(bool full_redraw_required, bool redraw_required)
                                                gb->gfxboard_surface = gfx_lock_picasso(gb->monitor_id, false, false);
                                        }
                                        if (gb->gfxboard_surface) {
-                                               if (!(currprefs.leds_on_screen & STATUSLINE_TARGET))
+                                               if (softstatusline())
                                                        picasso_statusline(gb->monitor_id, gb->gfxboard_surface);
                                        }
                                }
index 089fd3f0ee9c0dfebc29e05b99d7d7ec830f65b2..e290cd2fcc7f89be0295c8082dc3940956989a36 100644 (file)
@@ -30,6 +30,7 @@ static int td_pos = (TD_RIGHT | TD_BOTTOM);
 extern void draw_status_line_single(int monid, 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(int monid, uae_u8 *buf, int bpp, int y, int totalwidth);
 extern void statusline_getpos(int monid, int *x, int *y, int width, int height, int hx, int vx);
+extern bool softstatusline(void);
 
 #define STATUSTYPE_FLOPPY 1
 #define STATUSTYPE_DISPLAY 2
index 4de7dcc6db5f76ed3f53d089895f23634ab603e6..71043868936b3010f45abd2417d588648d79637d 100644 (file)
@@ -680,7 +680,7 @@ static void get_a2410_surface(struct a2410_struct *data)
                        gotsurf = true;
                }
                if (data->a2410_surface && gotsurf) {
-                       if (!(currprefs.leds_on_screen & STATUSLINE_TARGET))
+                       if (softstatusline())
                                picasso_statusline(monid, data->a2410_surface);
                }
        }
index d8f251834bdb7d868d2b3d8af1bc4b5871bd2520..53d08ee42568e399f8af257179435563d4281f0f 100644 (file)
@@ -4647,7 +4647,7 @@ static void picasso_flushpixels(int index, uae_u8 *src, int off, bool render)
                        dst = gfx_lock_picasso(monid, false, false);
                }
                if (dst) {
-                       if (!(currprefs.leds_on_screen & STATUSLINE_TARGET)) {
+                       if (softstatusline()) {
                                picasso_statusline(monid, dst);
                        }
                        maxy = vidinfo->height;
index a612edc15ea253137ed942e774f7225e0064d196..bd5f7ebed0ba6c0f3db9ccf05126bd1e90c2961f 100644 (file)
@@ -23,6 +23,13 @@ static HFONT statusline_font;
 static HPALETTE statusline_palette;
 static bool statusline_was_updated;
 
+bool softstatusline(void)
+{
+       if (currprefs.gfx_api > 0)
+               return false;
+       return (currprefs.leds_on_screen & STATUSLINE_TARGET) == 0;
+}
+
 void deletestatusline(int monid)
 {
        if (monid)