Page 1 of 1

@IF preprocessor command

Posted: Mon Feb 26, 2018 9:28 pm
by bitRocky
I wanted to do something like that:

Code: Select all

@DISPLAY { Width = 800, Height = 600, Title = "Blu Morpho - Lost In Space",
@IF #HW_ANDROID
	Mode = "FullScreenScale"
@ELSE
	Mode = "Windowed"
@ENDIF
}
But this doesn't seem to work, I get an error.

Re: @IF preprocessor command

Posted: Mon Feb 26, 2018 11:55 pm
by SamuraiCrow

Code: Select all

@IF #HW_ANDROID
@DISPLAY {TITLE="Blue Morpho - Lost in Space", MODE="FullScreenScale"}
@ELSE
@DISPLAY {MODE="Windowed", TITLE="Blue Morpho - Lost in Space"}
@ENDIF
should work. If you need the title defined once, use a const directive.

Re: @IF preprocessor command

Posted: Tue Feb 27, 2018 10:20 pm
by airsoftsoftwair
As @IF is itself a preprocessor command, it can't be included in the middle of another preprocessor command so you have to do it as shown by SamuraiCrow.