Android TSA TitleSafeArea

When I use the SpriteBatch to draw to position (0,0) I noticed on Android this draws it not exactly to the top left corner of the screen. I guess it has to do with the TitleSafeArea. The back buffer seems to use these TSA boundaries also.
So what is the recommended way of handling TSA? I could rely on the values provided by MonoGame. Or I guess I could use a backbuffer matching the screen size and decide where I draw stuff and where not myself?

Is there a switch to turn off TSA?

Turned out I had wrong values in my PreferredBackBuffer settings. So choosing ones which match the display resolution did the job and I get no bars on the sides anymore. So does SpriteBatch use the TitleSafeArea values by default? And if it does not match with the resolution but you want to draw it to the top left anyway you have to use some offset calculation? Did some more testing. Seems like if there is a TitleSafeArea with x or y not zero the viewport is set to the TSA area and so this is what defines the area where you can actually draw stuff to? So negative values work but everything is cutoff then which is beyond the viewport boundaries.

No, nothing like that. The backbuffer/Viewport resolution you are getting is a feature of monogame for the Android platform.

1 Like

Yes, that makes all sense now. Also I noticed everything (stuff drawn not with spritebatch) also gets cut of course when it’s outside the viewport boundaries. What’s the right word / term? Clipped? I was confused because I assumed the clear of the backbuffer with the GraphicsDevice.Clear() method would only affect the same area. But it affects the whole screen. I just added a few lines of code to be able to choose if I want fullscreen or TSA area. Basically in preparation for resolution Indipendent rendering to have a simpler implementation or test / debug scenario available. Not really necessary because I can test / debug on windows since I target desktop also.