TextInputDiagnostics.enabled and kBlurArtwork were mutable/const-false flags nothing ever set, yet the diagnostics side eagerly built log strings on the gamepad and key-simulator hot paths on every event. Both flags are now const bool.fromEnvironment (PLEZY_TEXT_INPUT_DIAGNOSTICS / PLEZY_BLUR_ARTWORK) so the branches const-fold away, every eager interpolation sits behind a guard, and screenshot blurring stays one dart-define away. The vowel-rotation title obfuscation had no consumer need beyond artwork blur and is gone.
16 lines
554 B
Dart
16 lines
554 B
Dart
import 'app_logger.dart';
|
|
import 'platform_detector.dart';
|
|
|
|
class TextInputDiagnostics {
|
|
/// Compile-time switch: run with
|
|
/// `--dart-define=PLEZY_TEXT_INPUT_DIAGNOSTICS=true` to enable. Const so the
|
|
/// guarded branches (and their log-string interpolation) compile out of
|
|
/// every normal build.
|
|
static const bool enabled = bool.fromEnvironment('PLEZY_TEXT_INPUT_DIAGNOSTICS');
|
|
|
|
static void log(String source, String message) {
|
|
if (!enabled || !PlatformDetector.isTV()) return;
|
|
appLogger.i('TextInputDiag $source: $message');
|
|
}
|
|
}
|