Add the thread priority to prevent unused sound thread use

This commit is contained in:
TwistedUmbrella 2014-02-12 16:40:25 -05:00
parent 4368f327ae
commit 4782c144f0
1 changed files with 7 additions and 1 deletions

View File

@ -107,7 +107,13 @@ public class GL2JNIView extends GLSurfaceView
System.gc();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
ethd = new EmuThread(prefs.getBoolean("sound_enabled", true));
boolean soundEndabled = prefs.getBoolean("sound_enabled", true);
ethd = new EmuThread(soundEndabled);
if (!soundEndabled) {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
// Ensures priority is not placed on disabled sound thread
}
touchVibrationEnabled = prefs.getBoolean("touch_vibration_enabled", true);
int rederType = prefs.getInt("render_type", LAYER_TYPE_HARDWARE);