Hello every body...
I have very long code, But i copy the problem part here. My problem is i get error when i run this code in Linux side... But It works fine on Windows side... I know the problem. I get error;
Linux Version says... "GetDeviceCaps_() is not a function, array, list, map or macro."
Is there any way to use System specific commands inside one code... I want to produce cross platform... I dont want to create 2 or 3 different code...
Thanks fot your help!
.
.
.
Select OS$(0)
Case "Windows"
X1.d=GetDeviceCaps_(GetDC_(0),#LOGPIXELSX)/96:Y1.d=GetDeviceCaps_(GetDC_(0),#LOGPIXELSY)/96
ExamineDesktops():h.WINDOWPLACEMENT:GetWindowPlacement_(GetDesktopWindow_(),@h)
X2.d=DesktopWidth(0)/h\rcNormalPosition\right:Y2.d=DesktopHeight(0)/h\rcNormalPosition\bottom
SX.d=X1:If X2>X1:SX=X2:EndIf:SY.d=Y1:If Y2>Y1:SY=Y2:EndIf:If OSVersion()<#PB_OS_Windows_Vista:SX=X1:SY=Y1:EndIf
aSCALE=SX:If SY>SX:aSCALE=SY:EndIf
Case "Linux"
aRunPRG("gsettings","get org.gnome.desktop.interface text-scaling-factor","","",1):aSCALE.f=ValF(PRGOut$)
EndSelect
.
.
.
Cross Platform System Specific Commands Problem...
Re: Cross Platform System Specific Commands Problem...
@arma,
I think you will find the answer in the manual under Compiler Directives.
You could use something like this:
I think you will find the answer in the manual under Compiler Directives.
You could use something like this:
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_MacOS
; some Mac OS X specific code
CompilerCase #PB_OS_Linux
; some Linux specific code
CompilerCase #PB_OS_Windows
; some Windows specific code
CompilerEndSelect
DE AA EB
Re: Cross Platform System Specific Commands Problem...
Thank YOU!
Your answer is helpful for me... It solved my big problem... Thank you again...
Your answer is helpful for me... It solved my big problem... Thank you again...