More stuff starting to work but no video yet. App needs some adaptations I guess
This commit is contained in:
@@ -258,7 +258,9 @@ public class MainActivity extends SDLActivity
|
||||
|
||||
public void initSDL()
|
||||
{
|
||||
(new Thread(new Runnable()
|
||||
Settings.Apply(this);
|
||||
super.nativeInit();
|
||||
/*(new Thread(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
@@ -268,7 +270,7 @@ public class MainActivity extends SDLActivity
|
||||
Log.i("SDL", "libSDL: Waiting for screen orientation to change - the device is probably in the lockscreen mode");
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch( Exception e ) {}
|
||||
} catch( Exception e ) {}*/
|
||||
/*
|
||||
tries--;
|
||||
if( tries <= 0 )
|
||||
@@ -277,7 +279,7 @@ public class MainActivity extends SDLActivity
|
||||
break;
|
||||
}
|
||||
*/
|
||||
if( _isPaused )
|
||||
/* if( _isPaused )
|
||||
{
|
||||
Log.i("SDL", "libSDL: Application paused, cancelling SDL initialization until it will be brought to foreground");
|
||||
return;
|
||||
@@ -291,7 +293,7 @@ public class MainActivity extends SDLActivity
|
||||
}
|
||||
});
|
||||
}
|
||||
})).start();
|
||||
})).start();*/
|
||||
}
|
||||
|
||||
private void initSDLInternal()
|
||||
@@ -312,12 +314,12 @@ public class MainActivity extends SDLActivity
|
||||
_videoLayout = new FrameLayout(this);
|
||||
SetLayerType.get().setLayerType(_videoLayout);
|
||||
setContentView(_videoLayout);
|
||||
mGLView = new DemoGLSurfaceView(this);
|
||||
SetLayerType.get().setLayerType(mGLView);
|
||||
_videoLayout.addView(mGLView);
|
||||
mGLView.setFocusableInTouchMode(true);
|
||||
mGLView.setFocusable(true);
|
||||
mGLView.requestFocus();
|
||||
//mGLView = new DemoGLSurfaceView(this);
|
||||
//SetLayerType.get().setLayerType(mGLView);
|
||||
//_videoLayout.addView(mGLView);
|
||||
//mGLView.setFocusableInTouchMode(true);
|
||||
//mGLView.setFocusable(true);
|
||||
//mGLView.requestFocus();
|
||||
if( _ad.getView() != null )
|
||||
{
|
||||
_videoLayout.addView(_ad.getView());
|
||||
@@ -325,7 +327,7 @@ public class MainActivity extends SDLActivity
|
||||
}
|
||||
// Receive keyboard events
|
||||
DimSystemStatusBar.get().dim(_videoLayout);
|
||||
DimSystemStatusBar.get().dim(mGLView);
|
||||
//DimSystemStatusBar.get().dim(mGLView);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -472,7 +472,7 @@ class Settings
|
||||
|
||||
static void Apply(MainActivity p)
|
||||
{
|
||||
nativeSetVideoDepth(Globals.VideoDepthBpp, Globals.NeedGles2 ? 1 : 0);
|
||||
/*nativeSetVideoDepth(Globals.VideoDepthBpp, Globals.NeedGles2 ? 1 : 0);
|
||||
if(Globals.VideoLinearFilter)
|
||||
nativeSetVideoLinearFilter();
|
||||
if( Globals.CompatibilityHacksVideo )
|
||||
@@ -552,7 +552,7 @@ class Settings
|
||||
nativeSetMultitouchGestureSensitivity(Globals.MultitouchGestureSensitivity);
|
||||
if( Globals.TouchscreenCalibration[2] > Globals.TouchscreenCalibration[0] )
|
||||
nativeSetTouchscreenCalibration(Globals.TouchscreenCalibration[0], Globals.TouchscreenCalibration[1],
|
||||
Globals.TouchscreenCalibration[2], Globals.TouchscreenCalibration[3]);
|
||||
Globals.TouchscreenCalibration[2], Globals.TouchscreenCalibration[3]);*/
|
||||
|
||||
String lang = new String(Locale.getDefault().getLanguage());
|
||||
if( Locale.getDefault().getCountry().length() > 0 )
|
||||
|
||||
@@ -471,7 +471,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
mWidth = w;
|
||||
mHeight = h;
|
||||
mGl = gl;
|
||||
nativeResize(w, h, Globals.KeepAspectRatio ? 1 : 0);
|
||||
nativeResize(w, h, Globals.KeepAspectRatio ? 1 : 0);
|
||||
}
|
||||
|
||||
public void onSurfaceDestroyed() {
|
||||
|
||||
Reference in New Issue
Block a user