diff mbox

ui/cocoa.m: Fix compile failures introduced by recent console changes

Message ID 1363638501-29603-1-git-send-email-peter.maydell@linaro.org
State Accepted
Commit 8510d91ebad522685bc1a29e7bbc1f5050af0d2c
Headers show

Commit Message

Peter Maydell March 18, 2013, 8:28 p.m. UTC
Fix various compilation failures introduced by the recent console
changes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 ui/cocoa.m | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Gerd Hoffmann March 19, 2013, 7:10 a.m. UTC | #1
On 03/18/13 21:28, Peter Maydell wrote:
> Fix various compilation failures introduced by the recent console
> changes.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  ui/cocoa.m | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 8e0eaa2..048cc97 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -403,6 +403,9 @@ QemuCocoaView *cocoaView;
>  {
>      COCOA_DEBUG("QemuCocoaView: switchSurface\n");
>  
> +    int w = surface_width(surface);
> +    int h = surface_height(surface);
> +
>      // update screenBuffer
>      if (dataProviderRef)
>          CGDataProviderRelease(dataProviderRef);
> @@ -1014,9 +1017,9 @@ static void cocoa_cleanup(void)
>  
>  static const DisplayChangeListenerOps dcl_ops = {
>      .dpy_name          = "cocoa",
> -    .dpy_gfx_update = cocoa_update;
> -    .dpy_gfx_switch = cocoa_switch;
> -    .dpy_refresh = cocoa_refresh;
> +    .dpy_gfx_update = cocoa_update,
> +    .dpy_gfx_switch = cocoa_switch,
> +    .dpy_refresh = cocoa_refresh,
>  };
>  
>  void cocoa_display_init(DisplayState *ds, int full_screen)

Acked-by: Gerd Hoffmann <kraxel@redhat.com>

[ I'll go pick it into the next console patch series, but wouldn't
  mind if someone applies this directly to fix the macos build ].

cheers,
  Gerd
Anthony Liguori March 19, 2013, 6:58 p.m. UTC | #2
Applied.  Thanks.

Regards,

Anthony Liguori
diff mbox

Patch

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 8e0eaa2..048cc97 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -403,6 +403,9 @@  QemuCocoaView *cocoaView;
 {
     COCOA_DEBUG("QemuCocoaView: switchSurface\n");
 
+    int w = surface_width(surface);
+    int h = surface_height(surface);
+
     // update screenBuffer
     if (dataProviderRef)
         CGDataProviderRelease(dataProviderRef);
@@ -1014,9 +1017,9 @@  static void cocoa_cleanup(void)
 
 static const DisplayChangeListenerOps dcl_ops = {
     .dpy_name          = "cocoa",
-    .dpy_gfx_update = cocoa_update;
-    .dpy_gfx_switch = cocoa_switch;
-    .dpy_refresh = cocoa_refresh;
+    .dpy_gfx_update = cocoa_update,
+    .dpy_gfx_switch = cocoa_switch,
+    .dpy_refresh = cocoa_refresh,
 };
 
 void cocoa_display_init(DisplayState *ds, int full_screen)