Well, I am no expert on SDL. But apparently there should be a way to set orientation on wayland.
The SDL_waylandwindow.h shows there is a qt_extended_surface pointer in the SDL_WindowData structure, which is used by the qt_extended_surface_set_content_orientation(struct qt_extended_surface *qt_extended_surface, int32_t orientation); function. So if you manage to create your surface, and get the extended_surface pointer, you should be able to set the orientation as well as add listeners for events. If you manage to get this working, please create a guide about it somewhere. Luciano On Wed, Mar 18, 2015 at 11:18 AM, Iosif Hamlatzis <i.hamlat...@gmail.com> wrote: > Regarding the orientation it's not something I can patch and submit, it's a > thing for Jolla since it has to do with the video driver. > > Looking at the code of SDL2, I would say the hint for the orientation is iOS > specific: > From the SDL_hints.h > > /** > * \brief A variable controlling which orientations are allowed on iOS. > * > * In some circumstances it is necessary to be able to explicitly control > * which UI orientations are allowed. > * > * This variable is a space delimited list of the following values: > * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown" > */ > #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS" > > > > And besides, if the system doesn't understand that I have rotated the device > I cannot do much in my game to modify the behaviour of "the go to > background" or "close" swipe. > > From previous emails I and others were given as a solution to the rotation > problem that we should do the math in our rendering functions as well as the > rotation and transformation for the touch events. So I did and my games work > perfectly on my device. > > I was happy to learn that problems they had in their system regarding the > SDL2 library were fixed and now they could accept games in the market > (previously my games were rejected because they didn't accept the SDL2 > library) and now I get my games again rejected not because of my fault, but > because they cannot handle the rotation, even if I am using a solution they > provided. > > I believe most games would be in landscape mode and not portrait, at least > mine are. So I would wait either for a solution from them or if they start > accepting games with different swipe gestures for "go to background" and > "close". > > And hopefully in the tablet version the default would be landscape mode. > I'll port the rest of the games to SailfishOS and have them ready for when > and if the problem has been fixed. > > > > > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org -- Luciano Montanaro Anyone who is capable of getting themselves made President should on no account be allowed to do the job. -- Douglas Adams _______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org