Commit 38334f76300260480e3bd3b77cb5b86fd3d66038

Authored by balrog
1 parent 818220f5

Don't use ds->dpy_copy directly from hw/ (Jan Niehusmann).

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
@@ -1343,3 +1343,16 @@ void qemu_console_resize(QEMUConsole *console, int width, int height) @@ -1343,3 +1343,16 @@ void qemu_console_resize(QEMUConsole *console, int width, int height)
1343 } 1343 }
1344 } 1344 }
1345 } 1345 }
  1346 +
  1347 +void qemu_console_copy(QEMUConsole *console, int src_x, int src_y,
  1348 + int dst_x, int dst_y, int w, int h) {
  1349 + if (active_console == console) {
  1350 + if (console->ds->dpy_copy)
  1351 + console->ds->dpy_copy(console->ds,
  1352 + src_x, src_y, dst_x, dst_y, w, h);
  1353 + else {
  1354 + /* TODO */
  1355 + console->ds->dpy_update(console->ds, dst_x, dst_y, w, h);
  1356 + }
  1357 + }
  1358 +}
console.h
@@ -140,6 +140,8 @@ CharDriverState *text_console_init(DisplayState *ds, const char *p); @@ -140,6 +140,8 @@ CharDriverState *text_console_init(DisplayState *ds, const char *p);
140 void console_select(unsigned int index); 140 void console_select(unsigned int index);
141 void console_color_init(DisplayState *ds); 141 void console_color_init(DisplayState *ds);
142 void qemu_console_resize(QEMUConsole *console, int width, int height); 142 void qemu_console_resize(QEMUConsole *console, int width, int height);
  143 +void qemu_console_copy(QEMUConsole *console, int src_x, int src_y,
  144 + int dst_x, int dst_y, int w, int h);
143 145
144 /* sdl.c */ 146 /* sdl.c */
145 void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); 147 void sdl_display_init(DisplayState *ds, int full_screen, int no_frame);
hw/cirrus_vga.c
@@ -769,13 +769,13 @@ static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h) @@ -769,13 +769,13 @@ static void cirrus_do_copy(CirrusVGAState *s, int dst, int src, int w, int h)
769 s->cirrus_blt_width, s->cirrus_blt_height); 769 s->cirrus_blt_width, s->cirrus_blt_height);
770 770
771 if (notify) 771 if (notify)
772 - s->ds->dpy_copy(s->ds,  
773 - sx, sy, dx, dy,  
774 - s->cirrus_blt_width / depth,  
775 - s->cirrus_blt_height); 772 + qemu_console_copy(s->console,
  773 + sx, sy, dx, dy,
  774 + s->cirrus_blt_width / depth,
  775 + s->cirrus_blt_height);
776 776
777 /* we don't have to notify the display that this portion has 777 /* we don't have to notify the display that this portion has
778 - changed since dpy_copy implies this */ 778 + changed since qemu_console_copy implies this */
779 779
780 if (!notify) 780 if (!notify)
781 cirrus_invalidate_region(s, s->cirrus_blt_dstaddr, 781 cirrus_invalidate_region(s, s->cirrus_blt_dstaddr,
hw/vmware_vga.c
@@ -384,7 +384,7 @@ static inline void vmsvga_copy_rect(struct vmsvga_state_s *s, @@ -384,7 +384,7 @@ static inline void vmsvga_copy_rect(struct vmsvga_state_s *s,
384 384
385 # ifdef DIRECT_VRAM 385 # ifdef DIRECT_VRAM
386 if (s->ds->dpy_copy) 386 if (s->ds->dpy_copy)
387 - s->ds->dpy_copy(s->ds, x0, y0, x1, y1, w, h); 387 + qemu_console_copy(s->console, x0, y0, x1, y1, w, h);
388 else 388 else
389 # endif 389 # endif
390 { 390 {