PhoenicisOrg/scripts

Update "Rocksmith" and "Rocksmith 2014" script

madoar opened this issue · 2 comments

The following changes should be done:

  • think about inlining the fixIni function
  • replace java.awt.Toolkit.getDefaultToolkit().getScreenSize()``with the newer screenManager/virtualDesktop` modules

function fixIni(ini) {
var screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
var content =
"[Audio]\n" +
"EnableMicrophone=0\n" +
"LatencyBuffer=4\n" +
"ExclusiveMode=0\n" +
"ForceWDM=0\n" +
"ForceDirectXSink=0\n" +
"DumpAudioLog=0\n" +
"MaxOutputBufferSize=0\n" +
"[Renderer.Win32]\n" +
"ScreenWidth=" +
screenSize.width +
"\n" +
"ScreenHeight=" +
screenSize.height +
"\n" +
"MinScreenWidth=640\n" +
"MinScreenHeight=480\n" +
"Fullscreen=1\n" +
"VisualQuality=8";
writeToFile(ini, content);
}

function fixIni(ini) {
var screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
var content =
"[Audio]\n" +
"EnableMicrophone=1\n" +
"ExclusiveMode=0\n" +
"LatencyBuffer=4\n" +
"ForceDefaultPlaybackDevice=\n" +
"ForceWDM=0\n" +
"ForceDirectXSink=0\n" +
"Win32UltraLowLatencyMode=0\n" +
"DumpAudioLog=0\n" +
"MaxOutputBufferSize=0\n" +
"[Renderer.Win32]\n" +
"ShowGamepadUI=0\n" +
"ScreenWidth=" +
screenSize.width +
"\n" +
"ScreenHeight=" +
screenSize.height +
"\n" +
"Fullscreen=2\n" +
"VisualQuality=1\n" +
"RenderingWidth=0\n" +
"RenderingHeight=0\n" +
"EnablePostEffects=1\n" +
"EnableShadows=1\n" +
"EnableHighResScope=1\n" +
"EnableDepthOfField=1\n" +
"EnablePerPixelLighting=1\n" +
"MsaaSamples=4\n" +
"DisableBrowser=0\n" +
"[Net]\n" +
"UseProxy=1";
writeToFile(ini, content);
}

plata commented

I think it's easier to read the code if fixIni is not inline.

@plate agreed