]> xenbits.xensource.com Git - qemu-xen-4.5-testing.git/commitdiff
Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann).
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 24 Sep 2008 02:21:24 +0000 (02:21 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 24 Sep 2008 02:21:24 +0000 (02:21 +0000)
I left a TODO in the code because this still doesn't definitely
fix all issues.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5308 c046a42c-6fe2-441c-8c8c-71466251a162

console.c
console.h
hw/cirrus_vga.c
hw/vmware_vga.c

index 785710a8b6e2fc45ed6d57e56c2ff5e876a9d47c..438a1d5fd3ba94a47137c1d9e543026dd90c10f3 100644 (file)
--- a/console.c
+++ b/console.c
@@ -1343,3 +1343,16 @@ void qemu_console_resize(QEMUConsole *console, int width, int height)
         }
     }
 }
+
+void qemu_console_copy(QEMUConsole *console, int src_x, int src_y,
+                int dst_x, int dst_y, int w, int h) {
+    if (active_console == console) {
+        if (console->ds->dpy_copy)
+            console->ds->dpy_copy(console->ds,
+                            src_x, src_y, dst_x, dst_y, w, h);
+        else {
+            /* TODO */
+            console->ds->dpy_update(console->ds, dst_x, dst_y, w, h);
+        }
+    }
+}
index fcac1ebb8a0b66dbfdc6a6d3855b2473739b9d93..d98bea4481ee80b6e80b819f3c948cbee6e0adc0 100644 (file)
--- a/console.h
+++ b/console.h
@@ -140,6 +140,8 @@ CharDriverState *text_console_init(DisplayState *ds, const char *p);
 void console_select(unsigned int index);
 void console_color_init(DisplayState *ds);
 void qemu_console_resize(QEMUConsole *console, int width, int height);
+void qemu_console_copy(QEMUConsole *console, int src_x, int src_y,
+                int dst_x, int dst_y, int w, int h);
 
 /* sdl.c */
 void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
index 8e223e2662c65830f8a6fe7d825d36613fd8bd28..53688a0eacbeb563a63d691be7f0a4e22f341afb 100644 (file)
@@ -769,13 +769,13 @@ static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)
                      s->cirrus_blt_width, s->cirrus_blt_height);
 
     if (notify)
-       s->ds->dpy_copy(s->ds,
-                       sx, sy, dx, dy,
-                       s->cirrus_blt_width / depth,
-                       s->cirrus_blt_height);
+       qemu_console_copy(s->console,
+                         sx, sy, dx, dy,
+                         s->cirrus_blt_width / depth,
+                         s->cirrus_blt_height);
 
     /* we don't have to notify the display that this portion has
-       changed since dpy_copy implies this */
+       changed since qemu_console_copy implies this */
 
     if (!notify)
        cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,
index efbcd966a5c9375d0008c77d3d53b127886f3ac6..625cd835760a6e7a86f7ad2c35dda053848ad564 100644 (file)
@@ -384,7 +384,7 @@ static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
 
 # ifdef DIRECT_VRAM
     if (s->ds->dpy_copy)
-        s->ds->dpy_copy(s->ds, x0, y0, x1, y1, w, h);
+        qemu_console_copy(s->console, x0, y0, x1, y1, w, h);
     else
 # endif
     {