Source: Engines/Wine/Plugins/GLSL/script.js

  1. const Regedit = include("engines.wine.plugins.regedit");
  2. /**
  3. * Plugin to force the use of GLSL
  4. */
  5. module.default = class GLSL {
  6. constructor(wine) {
  7. this.wine = wine;
  8. }
  9. /**
  10. * Specifies the mode
  11. *
  12. * @param {string} mode enabled or disabled
  13. * @returns {GLSL} This
  14. */
  15. withMode(mode) {
  16. this.mode = mode;
  17. return this;
  18. }
  19. go() {
  20. const regeditFileContent = `REGEDIT4\n\n[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]\n"UseGLSL"="${this.mode}"`;
  21. new Regedit(this.wine).patch(regeditFileContent);
  22. }
  23. };