Commit cc06703e authored by Alexandre Julliard's avatar Alexandre Julliard

wineandroid: Add a helper function to update a window surface.

parent 357c2bb9
......@@ -530,6 +530,20 @@ public class WineActivity extends Activity
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 @@ public class WineActivity extends Activity
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 @@ public class WineActivity extends Activity
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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment