Propagate the possible exceptions during codec capability checks to the caller so a nice dialog can be displayed instead of crashing on buggy ROMs. Small change to evdev shutdown.
This commit is contained in:
@@ -198,7 +198,16 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
controllerHandler = new ControllerHandler(conn);
|
||||
|
||||
decoderRenderer = new ConfigurableDecoderRenderer();
|
||||
decoderRenderer.initializeWithFlags(drFlags);
|
||||
|
||||
try {
|
||||
decoderRenderer.initializeWithFlags(drFlags);
|
||||
} catch (Exception e) {
|
||||
Dialog.displayDialog(this, "Hardware Decoder Failure",
|
||||
"The hardware decoder failed to initialize. First, try restarting your device."+
|
||||
"If the issue persists, please send an email to the app developer. Forcing software decoding" +
|
||||
"can circumvent this error if needed.", true);
|
||||
return;
|
||||
}
|
||||
|
||||
SurfaceHolder sh = sv.getHolder();
|
||||
if (stretchToFit || !decoderRenderer.isHardwareAccelerated()) {
|
||||
@@ -301,7 +310,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
if (LimelightBuildProps.ROOT_BUILD) {
|
||||
if (evdevWatcher != null) {
|
||||
evdevWatcher.shutdown();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user