This commit is contained in:
Thomas Peterson 2024-10-18 14:18:50 +02:00
parent fd8a39903a
commit f4d6e3abdb
3 changed files with 3 additions and 5 deletions

View File

@ -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;

View File

@ -37,7 +37,6 @@ class OrderedEventLoop extends EventLoop
if($event == null) break;
$this->poll($event);
}
usleep(20);
}
}
}

View File

@ -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{