Update Settings.tsx
This commit is contained in:
parent
b7274eb2e9
commit
6377f7be71
@ -41,7 +41,7 @@ export const Settings: NavigationFunctionComponent = ({ componentId }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const listener = Navigation.events().registerScreenPoppedListener((event) => {
|
const listener = Navigation.events().registerScreenPoppedListener((event) => {
|
||||||
if (event.componentId === componentId) setFpsSelector(fps);
|
if (event.componentId === componentId) setFpsSelector(Math.round(fps));
|
||||||
});
|
});
|
||||||
return () => {
|
return () => {
|
||||||
listener.remove();
|
listener.remove();
|
||||||
@ -51,7 +51,7 @@ export const Settings: NavigationFunctionComponent = ({ componentId }) => {
|
|||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<View style={styles.vControl}>
|
<View style={styles.vControl}>
|
||||||
<Text>Frame Rate (FPS): {fps}</Text>
|
<Text>Frame Rate (FPS): {Math.round(fps)}</Text>
|
||||||
{minFps != null && maxFps != null && <Slider minimumValue={minFps} maximumValue={maxFps} value={fps} onValueChange={setFps} />}
|
{minFps != null && maxFps != null && <Slider minimumValue={minFps} maximumValue={maxFps} value={fps} onValueChange={setFps} />}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user