wineandroid: Add a helper function to update a window surface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
357c2bb9f9
commit
cc06703e3a
|
@ -530,6 +530,20 @@ public int get_hwnd()
|
|||
return hwnd;
|
||||
}
|
||||
|
||||
private void update_surface( boolean is_client )
|
||||
{
|
||||
if (is_client)
|
||||
{
|
||||
Log.i( LOGTAG, String.format( "set client surface hwnd %08x %s", hwnd, client_surface ));
|
||||
if (client_surface != null) wine_surface_changed( hwnd, client_surface, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.i( LOGTAG, String.format( "set window surface hwnd %08x %s", hwnd, window_surface ));
|
||||
if (window_surface != null) wine_surface_changed( hwnd, window_surface, false );
|
||||
}
|
||||
}
|
||||
|
||||
public void set_surface( SurfaceTexture surftex, boolean is_client )
|
||||
{
|
||||
if (is_client)
|
||||
|
@ -540,8 +554,6 @@ else if (surftex != client_surftex)
|
|||
client_surftex = surftex;
|
||||
client_surface = new Surface( surftex );
|
||||
}
|
||||
Log.i( LOGTAG, String.format( "set client surface hwnd %08x %s", hwnd, client_surface ));
|
||||
wine_surface_changed( hwnd, client_surface, true );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -551,9 +563,8 @@ else if (surftex != window_surftex)
|
|||
window_surftex = surftex;
|
||||
window_surface = new Surface( surftex );
|
||||
}
|
||||
Log.i( LOGTAG, String.format( "set window surface hwnd %08x %s", hwnd, window_surface ));
|
||||
wine_surface_changed( hwnd, window_surface, false );
|
||||
}
|
||||
update_surface( is_client );
|
||||
}
|
||||
|
||||
public void get_event_pos( MotionEvent event, int[] pos )
|
||||
|
|
Loading…
Reference in New Issue