GPUSettings.ts 691 B

123456789101112131415
  1. // this file is here for two reasons:
  2. // 1. web requires ./GPUSettings file from electron app (bad!), and requires are
  3. // relative to process.main (bootstrap's index.js)
  4. // 2. GPUSettings has been refactored into GPUSettings, and because we want to
  5. // be able to update GPUSettings OTA, we will have the core module provide
  6. // us with the GPUSettings
  7. // so tl;dr this is core module's GPUSettings, providing compat for web
  8. export function replace(GPUSettings) {
  9. // replacing module.exports directly would have no effect, since requires are cached
  10. // so we mutate the existing object
  11. for (const name of Object.keys(GPUSettings)) {
  12. exports[name] = GPUSettings[name];
  13. }
  14. };