Hi, I'm using the following code to get the display height and width:
${SegmentFile}
${SegmentInit}
System::Call user32::GetSystemMetrics(i0)i.r0
System::Call user32::GetSystemMetrics(i1)i.r1
${SetEnvironmentVariable} ScreenWidth $0
${SetEnvironmentVariable} ScreenHeight $1
!macroend
However, I really need the screen refresh rate as well. I have no idea how to incorporate win32 functions into NSIS. Can you help me?
Thanks.
You've previously asked for this here: https://portableapps.com/node/56216
Oh yeah, sorry about that, I completely forgot. Still, I didn't really get any solution 2 years ago.
Wouldn't it be better asking the question on a 'specialist' NSIS Forum, where there is a larger target audience?
The guys over on the NSIS forum supplied me with this bit of code:
!define /IfNDef CCHDEVICENAME 32
!define /IfNDef CCHFORMNAME 32
!define /IfNDef ENUM_CURRENT_SETTINGS -1
!define /IfNDef DM_DISPLAYFREQUENCY 0x00400000L
!include LogicLib.nsh
System::Call '*(&i${CCHDEVICENAME},i,&l2,&i2,i0, i,i,i,i, i,i,&i2,&i${CCHFORMNAME},&i2,i,i,i,i,i)p.r1'
System::Call 'USER32::EnumDisplaySettingsA(p0, i${ENUM_CURRENT_SETTINGS}, pr1)i.r0'
System::Call '*$1(&i${CCHDEVICENAME},i,&l2,&i2,i, i,i,i,i, i,i,&i2,&i${CCHFORMNAME},&i2,i,i,i,i,i.r2)'
System::Free $1
${If} $0 0
DetailPrint $2
${EndIf}
Does anyone know how to make this useable in PAL?
Thanks a lot.