Fix memory speed setting not updating properly between profiles

This commit is contained in:
NGnius (Graham) 2024-03-17 16:16:04 -04:00
parent 479cbf22aa
commit a2e9de941b
2 changed files with 2 additions and 2 deletions

View file

@ -236,7 +236,7 @@ export async function setGpuSlowMemory(clock: number): Promise<number> {
return (await call_backend("GPU_set_slow_memory", [clock]))[0];
}
export async function getGpuSlowMemory(): Promise<number> {
export async function getGpuSlowMemory(): Promise<number | null> {
return (await call_backend("GPU_get_slow_memory", []))[0];
}

View file

@ -170,7 +170,7 @@ const reload = function() {
set_value(CLOCK_MIN_GPU, limits[0]);
set_value(CLOCK_MAX_GPU, limits[1]);
});
backend.resolve(backend.getGpuSlowMemory(), (status: number) => { set_value(SLOW_MEMORY_GPU, status) });
backend.resolve_nullable(backend.getGpuSlowMemory(), (status: number | null) => { set_value(SLOW_MEMORY_GPU, status) });
backend.resolve(backend.getGeneralPersistent(), (value: boolean) => { set_value(PERSISTENT_GEN, value) });
backend.resolve(backend.getGeneralSettingsName(), (name: string) => { set_value(NAME_GEN, name) });