disableSync<T> method

T disableSync<T>(
  1. T f()
)

Executes f with RaylibTemp syncing temporarily disabled, restoring the previous sync state afterward.

Implementation

T disableSync<T>(T Function() f) {
  final oldSyncing = Temp.doSync;
  Temp.enableSyncing(false);
  final result = f();
  Temp.enableSyncing(oldSyncing);
  return result;
}