diff --git a/src/PHPNative/Framework/src/Loop/LoopInterface.php b/src/PHPNative/Framework/src/Loop/LoopInterface.php index f36313a..acf4217 100644 --- a/src/PHPNative/Framework/src/Loop/LoopInterface.php +++ b/src/PHPNative/Framework/src/Loop/LoopInterface.php @@ -4,9 +4,9 @@ namespace PHPNative\Framework\Loop; interface LoopInterface { - public const DEFAULT_FRAME_RATE = 5; + public const DEFAULT_FRAME_RATE = 60; - public const DEFAULT_UPDATE_RATE = 5; + public const DEFAULT_UPDATE_RATE = 60; public function run(int $frameRate = self::DEFAULT_FRAME_RATE, int $updateRate = self::DEFAULT_UPDATE_RATE): void; diff --git a/src/PHPNative/Framework/src/Loop/OrderedEventLoop.php b/src/PHPNative/Framework/src/Loop/OrderedEventLoop.php index 95e5c34..19b3fcc 100644 --- a/src/PHPNative/Framework/src/Loop/OrderedEventLoop.php +++ b/src/PHPNative/Framework/src/Loop/OrderedEventLoop.php @@ -37,7 +37,6 @@ class OrderedEventLoop extends EventLoop if($event == null) break; $this->poll($event); } - usleep(20); } } } \ No newline at end of file diff --git a/src/PHPNative/Renderer/src/Widgets/Container.php b/src/PHPNative/Renderer/src/Widgets/Container.php index c94f90c..ae11532 100644 --- a/src/PHPNative/Renderer/src/Widgets/Container.php +++ b/src/PHPNative/Renderer/src/Widgets/Container.php @@ -122,11 +122,10 @@ class Container $resultViewPort = Row::render($stylesCache, $thread, clone $viewport, $view, $index+1); } } - if($resultViewPort != null) { if (isset($styles[Overflow::class]) && $f = $styles[Overflow::class] && ( $styles[Overflow::class]->y == OverflowEnum::scroll || - ($styles[Overflow::class]->y == OverflowEnum::auto && $viewport->height < $resultViewPort->height) + ($styles[Overflow::class]->y == OverflowEnum::auto) )) { \PHPNative\Renderer\Visuals\Visuals::render($view->getId(), $thread, $styles, $backgroundViewport, $index); }else{