| 217 | } |
| 218 | |
| 219 | function toBackendConfig(config: NodeAppConfig | undefined): NodeBackendConfig { |
| 220 | if (config === undefined) return {}; |
| 221 | return { |
| 222 | ...(config.executionMode !== undefined ? { executionMode: config.executionMode } : {}), |
| 223 | ...(config.fpsCap !== undefined ? { fpsCap: config.fpsCap } : {}), |
| 224 | ...(config.maxEventBytes !== undefined ? { maxEventBytes: config.maxEventBytes } : {}), |
| 225 | ...(config.frameTransport !== undefined ? { frameTransport: config.frameTransport } : {}), |
| 226 | ...(config.frameSabSlotCount !== undefined |
| 227 | ? { frameSabSlotCount: config.frameSabSlotCount } |
| 228 | : {}), |
| 229 | ...(config.frameSabSlotBytes !== undefined |
| 230 | ? { frameSabSlotBytes: config.frameSabSlotBytes } |
| 231 | : {}), |
| 232 | ...(config.nativeConfig !== undefined ? { nativeConfig: config.nativeConfig } : {}), |
| 233 | ...(config.screen !== undefined ? { screen: config.screen } : {}), |
| 234 | }; |
| 235 | } |
| 236 | |
| 237 | export function createNodeApp<S>(opts: CreateNodeAppOptions<S>): NodeApp<S> { |
| 238 | const appConfig = toAppConfig(opts.config); |