Skip to content
Browse files

More semaphores in Java code

  • Loading branch information...
1 parent 5065c1a commit f0e8a3d12f90fe2e4a6038b3ba95693db27b64e1 @pelya committed Mar 23, 2013
Showing with 5 additions and 1 deletion.
  1. +4 −0 project/java/MainActivity.java
  2. +1 −1 project/jni/application/openarena/engine
View
4 project/java/MainActivity.java
@@ -100,6 +100,8 @@ protected void onCreate(Bundle savedInstanceState)
_layout2 = new LinearLayout(this);
_layout2.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+ final Semaphore loadedLibraries = new Semaphore(0);
+
if( Globals.StartupMenuButtonTimeout > 0 )
{
_btn = new Button(this);
@@ -113,6 +115,7 @@ public void onClick(View v)
{
setUpStatusLabel();
System.out.println("libSDL: User clicked change phone config button");
+ loadedLibraries.acquireUninterruptibly();
Settings.showConfig(p, false);
}
};
@@ -173,6 +176,7 @@ public void run()
{
Settings.Load(Parent);
loaded.release();
+ loadedLibraries.release();
}
}
Callback2 cb = new Callback2();
2 project/jni/application/openarena/engine
@@ -1 +1 @@
-Subproject commit af105be9ec78d61b5642298687b8bedfb9bc12ac
+Subproject commit 3770fe9b65b9e0b6588fe35a59f7a3a49ec8629e

0 comments on commit f0e8a3d

Please sign in to comment.
Something went wrong with that request. Please try again.