Hi everybody,
I'd like to give 3 parameters to a exe: screen height, screen width and screen refresh rate (Hertz).
E.g.: -params 1280,1024,60.
I don't think there is a portableapps variable for it, so I searched for a NSIS solution.
For screen height and width I found this: http://nsis.sourceforge.net/Get_User%27s_screen_resolution .
But I couldn't find anything usefull for the screen refresh rate.
Anyway, I'd like to give the first two a go, I'll hardcode the framerate for a while.
Can somebody help me to add these to the CommandLineArguments value in launcher.ini?
I've searched the forums and checked the launcher manual, but I couldn't find something to change/add a value.
This is the line I currently have in launcher.ini.
CommandLineArguments=' -Vidmode 1280,1024,60'
Do I have to delete the line and set it completely in Custom.nsh? If so, what NSIS call do I use?
Or replace "-Vidmode 1280,1024,60" with "-Vidmode AAAA,BBBB,CCCC" and replace these letters by the right values before the exe starts and reverse the change when the exe is finished?
This is all I thought about, can someone give me a hint?
Thanks in advance!
I would suggest using that function in Custom.nsh, and then set environment variables for the results.
You would then include those variables in your command line arguments, something like -Vidmode %ScreenHeight%,%ScreenWidth%, 60
Ok, it worked, here's the code if anyone is interested:
I'm not sure if the location of the code (Init) is ok, but hey, it works!
Yes, I set the working directory!
That code can be simplified considerably.
I am a Christian and a developer and moderator here.
“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1
Thanks, I'm not that into the NSIS syntax.
Hopefully that'll change soon
Yes, I set the working directory!