HRESULT hr;
hr = IDirectManipulationViewport_GetPrimaryContent (viewport, iid, (void**)&content);
- HR_CHECK (hr);
+ HR_CHECK_GOTO (hr, failed);
hr = IDirectManipulationContent_SyncContentTransform (content, identity,
G_N_ELEMENTS (identity));
- HR_CHECK (hr);
+ HR_CHECK_GOTO (hr, failed);
+failed:
IUnknown_Release (content);
}
{
DIRECTMANIPULATION_CONFIGURATION configuration = 0;
HWND hwnd = GDK_SURFACE_HWND (surface);
- IDirectManipulationViewportEventHandler *handler;
+ IDirectManipulationViewportEventHandler *handler = NULL;
DWORD cookie = 0;
HRESULT hr;
hr = IDirectManipulationManager_Activate (dmanipulation_manager,
GDK_SURFACE_HWND (surface));
- HR_CHECK (hr);
+ HR_CHECK_RETURN (hr);
}
void gdk_dmanipulation_finalize_surface (GdkSurface *surface)
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_pan,
pointer_id);
- HR_CHECK (hr);
+ HR_CHECK_RETURN (hr);
hr = IDirectManipulationViewport_SetContact (surface_win32->dmanipulation_viewport_zoom,
pointer_id);
- HR_CHECK (hr);
+ HR_CHECK_RETURN (hr);
}
}
#define HR_CHECK_RETURN(hr) { if G_UNLIKELY (FAILED (hr)) return; }
#define HR_CHECK_RETURN_VAL(hr, val) { if G_UNLIKELY (FAILED (hr)) return val; }
-#define HR_CHECK(hr)
#define HR_CHECK_GOTO(hr, label) { if G_UNLIKELY (FAILED (hr)) goto label; }
extern LRESULT CALLBACK _gdk_win32_surface_procedure (HWND, UINT, WPARAM, LPARAM);