Various compilation scripts & patches for Linux programs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
3.2 KiB

7 years ago
  1. --- a/python/configure.py
  2. +++ b/python/configure.py
  3. @@ -361,6 +361,12 @@
  4. else:
  5. subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_Wine_DirectInput", param, self.display_elements[param].GetValue().encode('utf-8','replace')])
  6. + def change_Optimus_settings(self, param):
  7. + if(self.s_isPrefix == False):
  8. + subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", self.s_title.encode('utf-8','replace'), "POL_Optimus_Support", param, self.display_elements[param].GetValue().encode('utf-8','replace')])
  9. + else:
  10. + subprocess.Popen(["bash", Variables.playonlinux_env+"/bash/POL_Command", "--prefix", self.s_prefix.encode('utf-8','replace'), "POL_Optimus_Support", param, self.display_elements[param].GetValue().encode('utf-8','replace')])
  11. +
  12. def get_current_settings(self, param):
  13. self.display_elements[param].SetValue(self.settings[param])
  14. @@ -425,7 +431,7 @@
  15. self.display_elements["pre_run_text"].Hide()
  16. self.Refresh()
  17. - self.elements = ["UseGLSL","DirectDrawRenderer","VideoMemorySize","OffscreenRenderingMode","RenderTargetModeLock","Multisampling","StrictDrawOrdering","MouseWarpOverride"]
  18. + self.elements = ["UseGLSL","DirectDrawRenderer","VideoMemorySize","OffscreenRenderingMode","RenderTargetModeLock","Multisampling","StrictDrawOrdering","OptimusSupport","MouseWarpOverride"]
  19. self.settings = wine.LoadRegValues(self.s_prefix,self.elements)
  20. #print self.settings
  21. self.get_current_settings("UseGLSL")
  22. @@ -435,6 +441,7 @@
  23. self.get_current_settings("RenderTargetModeLock")
  24. self.get_current_settings("Multisampling")
  25. self.get_current_settings("StrictDrawOrdering")
  26. + self.get_current_settings("OptimusSupport")
  27. self.get_current_settings("MouseWarpOverride")
  28. self.arch = playonlinux.GetSettings('ARCH',self.s_prefix)
  29. @@ -465,6 +472,8 @@
  30. self.change_Direct3D_settings("Multisampling")
  31. if(param == 307):
  32. self.change_Direct3D_settings("StrictDrawOrdering")
  33. + if(param == 308):
  34. + self.change_Direct3D_settings("OptimusSupport")
  35. if(param == 401):
  36. self.change_DirectInput_settings("MouseWarpOverride")
  37. @@ -569,7 +578,7 @@
  38. self.AddDisplayElement(_("Render target mode lock"),"RenderTargetModeLock",["disabeld","readdraw","readtex"],["disabled","readdraw","readtex"],5)
  39. self.AddDisplayElement(_("Multisampling"),"Multisampling",["Enabled","Disabled"],["enabled","disabled"],6)
  40. self.AddDisplayElement(_("Strict Draw Ordering"),"StrictDrawOrdering",["enabled","disabled"],["enabled","disabled"],7)
  41. -
  42. + self.AddDisplayElement(_("Optimus Support"),"OptimusSupport",["enabled","disabled"],["enabled","disabled"],8)
  43. def Miscellaneous(self, nom):
  44. self.misc_elements = {}
  45. --- a/lib/wine.lib
  46. +++ b/lib/wine.lib
  47. @@ -543,6 +543,14 @@
  48. return $errors
  49. }
  50. +POL_Optimus_Support ()
  51. +{
  52. +# POL_Wine_AutoSetVersionEnv
  53. +# wineserver -k
  54. + "$(POL_Config_Write PRE_WINE 'optirun')"
  55. +# wineserver -k
  56. +}
  57. +
  58. POL_Wine_SelectPrefix()
  59. {
  60. # Select a wineprefix and remove unexpected chars