more work on widescreen mode, better C api