Here's mine. Please note the LEB_EXTENSIONS macro at the start of the .c. You'll most likely need to set that to 0. I tested my SetOrientation() with this driver for Landscape and Landscape180; both worked. As you can understand I did not want to have to define a new screen just to test the Portrait modes. However, I created another program, Bluescreen, to develop, debug, the code that went into the driver. That worked in all 4 modes for what it's worth. It appears the the max attachments is 3 so the source for Bluscreen is attached to another post
Take care