From f4d6e3abdbb531c6fc1222e52b76e2c05ed9f27f Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Fri, 18 Oct 2024 14:18:50 +0200 Subject: [PATCH] Fixes --- src/PHPNative/Framework/src/Loop/LoopInterface.php | 4 ++-- src/PHPNative/Framework/src/Loop/OrderedEventLoop.php | 1 - src/PHPNative/Renderer/src/Widgets/Container.php | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) 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{