Fixed ndk-gdb not showing symbols in libapplication.so
This commit is contained in:
@@ -37,7 +37,8 @@ class Globals {
|
||||
public static boolean NeedDepthBuffer = false;
|
||||
public static boolean NeedStencilBuffer = false;
|
||||
public static boolean NeedGles2 = false;
|
||||
public static boolean CompatibilityHacks = false;
|
||||
public static boolean CompatibilityHacksVideo = false;
|
||||
public static boolean CompatibilityHacksStaticInit = false;
|
||||
public static boolean HorizontalOrientation = true;
|
||||
public static boolean InhibitSuspend = false;
|
||||
public static String ReadmeText = "^You may press \"Home\" now - the data will be downloaded in background".replace("^","\n");
|
||||
|
||||
@@ -135,6 +135,8 @@ public class MainActivity extends Activity {
|
||||
mAudioThread = new AudioThread(this);
|
||||
System.out.println("libSDL: Loading settings");
|
||||
Settings.Load(this);
|
||||
if(!Globals.CompatibilityHacksStaticInit)
|
||||
LoadApplicationLibrary(this);
|
||||
}
|
||||
|
||||
if( !Settings.settingsChanged )
|
||||
@@ -224,6 +226,7 @@ public class MainActivity extends Activity {
|
||||
mGLView.setFocusable(true);
|
||||
mGLView.requestFocus();
|
||||
DimSystemStatusBar.get().dim(_videoLayout);
|
||||
DimSystemStatusBar.get().dim(mGLView);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -683,6 +686,37 @@ public class MainActivity extends Activity {
|
||||
|
||||
};
|
||||
|
||||
public static void LoadApplicationLibrary(final Context context)
|
||||
{
|
||||
String libs[] = { "application", "sdl_main" };
|
||||
try
|
||||
{
|
||||
for(String l : libs)
|
||||
{
|
||||
System.loadLibrary(l);
|
||||
}
|
||||
}
|
||||
catch ( UnsatisfiedLinkError e )
|
||||
{
|
||||
System.out.println("libSDL: error loading lib: " + e.toString());
|
||||
try
|
||||
{
|
||||
for(String l : libs)
|
||||
{
|
||||
String libname = System.mapLibraryName(l);
|
||||
File libpath = new File(context.getCacheDir(), libname);
|
||||
System.out.println("libSDL: loading lib " + libpath.getPath());
|
||||
System.load(libpath.getPath());
|
||||
libpath.delete();
|
||||
}
|
||||
}
|
||||
catch ( UnsatisfiedLinkError ee )
|
||||
{
|
||||
System.out.println("libSDL: error loading lib: " + ee.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getApplicationVersion()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -2359,7 +2359,7 @@ class Settings
|
||||
Globals.SmoothVideo
|
||||
};
|
||||
|
||||
if(Globals.SwVideoMode && !Globals.CompatibilityHacks)
|
||||
if(Globals.SwVideoMode && !Globals.CompatibilityHacksVideo)
|
||||
{
|
||||
CharSequence[] items2 = {
|
||||
p.getResources().getString(R.string.pointandclick_keepaspectratio),
|
||||
@@ -2454,7 +2454,7 @@ class Settings
|
||||
nativeSetVideoDepth(Globals.VideoDepthBpp, Globals.NeedGles2 ? 1 : 0);
|
||||
if(Globals.SmoothVideo)
|
||||
nativeSetSmoothVideo();
|
||||
if( Globals.CompatibilityHacks )
|
||||
if( Globals.CompatibilityHacksVideo )
|
||||
{
|
||||
Globals.MultiThreadedVideo = true;
|
||||
Globals.SwVideoMode = true;
|
||||
|
||||
@@ -389,33 +389,8 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
|
||||
mGlContextLost = false;
|
||||
|
||||
String libs[] = { "application", "sdl_main" };
|
||||
try
|
||||
{
|
||||
for(String l : libs)
|
||||
{
|
||||
System.loadLibrary(l);
|
||||
}
|
||||
}
|
||||
catch ( UnsatisfiedLinkError e )
|
||||
{
|
||||
System.out.println("libSDL: error loading lib: " + e.toString());
|
||||
try
|
||||
{
|
||||
for(String l : libs)
|
||||
{
|
||||
String libname = System.mapLibraryName(l);
|
||||
File libpath = new File(context.getCacheDir(), libname);
|
||||
System.out.println("libSDL: loading lib " + libpath.getPath());
|
||||
System.load(libpath.getPath());
|
||||
libpath.delete();
|
||||
}
|
||||
}
|
||||
catch ( UnsatisfiedLinkError ee )
|
||||
{
|
||||
System.out.println("libSDL: error loading lib: " + ee.toString());
|
||||
}
|
||||
}
|
||||
if(Globals.CompatibilityHacksStaticInit)
|
||||
MainActivity.LoadApplicationLibrary(context);
|
||||
|
||||
Settings.Apply(context);
|
||||
DifferentTouchInput.ExternalMouseDetected = false;
|
||||
@@ -426,7 +401,7 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
// Calls main() and never returns, hehe - we'll call eglSwapBuffers() from native code
|
||||
nativeInit( Globals.DataDir,
|
||||
Globals.CommandLine,
|
||||
( (Globals.SwVideoMode && Globals.MultiThreadedVideo) || Globals.CompatibilityHacks ) ? 1 : 0 );
|
||||
( (Globals.SwVideoMode && Globals.MultiThreadedVideo) || Globals.CompatibilityHacksVideo ) ? 1 : 0 );
|
||||
System.exit(0); // The main() returns here - I don't bother with deinit stuff, just terminate process
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user