Interestingly, Uganda had an openly gay monarch back in the mid-19th Century, at a time when in Britain we were still hanging homosexuals.
Colonialism and Christianity brought anti-gay laws to Uganda in the late 1900s.
Of course, this doesn't excuse these laws being upheld and strengthened...