DCS, for the actual A10C Warthog in particular, used the flaps switch in absolute mode via a bit of “jiggery pokery”.
The problem is that the up and down positions have monitorable states, but the centre position does not. They therefore somehow had to specially code in that if the switch was up, that maps to flaps fully retracted, the switch down maps to flaps fully extended and if neither was the case (the centre position) the flaps are half way in between.
Using this “trick” various other aircraft also allowed this and other 3 position switches, with just 2 states, to be used to effectively provide 3 states. This is what MSFS has yet to provide.
Oh, and I’m fairly sure that there are also 2 position switches that only have one monitorable state.
You can check using the Windows USB game controller setup dialogue