Windows Phone 8 SDL support

T-Bone wrote:

I’m having issues when running SDL in landscape for Windows Phone (Windows for computer/tablets have none of these issues as far as I can tell). I’m using ANGLE, so the issue could be related to that as well.

I believe the issue is a combination of ANGLE and Windows itself. See https://github.com/MSOpenTech/angle/issues/25 for detail.

To note, SDL’s non-XAML backend is roughly analogous to ANGLE’s ‘UniversalCoreWindow’ code. In that case, using MS-OpenTech’s suggested workaround may be useful (rotate all content before drawing it, at least on WinRT).

I’ll make a note to try integrating this workaround into the GLES2 Gears demo. I’m pretty busy with other stuff at the moment, unfortunately, and might not be able to get to it for a few weeks though. :frowning:

– David L.

Malkierian wrote:

So, for now, I gather that the on-screen keyboard is not functioning on WP (since SDL_HasScreenKeyboardSupport() returns false). Is there anything I can do to speed the implementation of this feature? It’s rather crucial to my port of OpenTyrian.

Patches would be welcomed. :slight_smile:

To note, I’m not certain it would be possible to do this without using WinRT’s XAML APIs. I have experimental support for XAML-integration at https://bitbucket.org/davidludwig/sdl, which you’re welcome to try using, at your own risk. I haven’t tried adding on-screen keyboard support yet, and am not entirely sure how possible it’ll be. Warning: I have read that bringing up an on-screen keyboard might require setting a control’s focus via touch, rather than programmatically (from https://social.msdn.microsoft.com/Forums/en-US/9d6bb336-c519-48e5-82a4-5accb489f158/entering-text-in-windows-8-in-cmonogame-app?forum=winappswithcsharp )

Cheers!
– David L.

Hmm… Then I guess that the next option would be to create a custom keyboard. It likely wouldn’t be able to utilize dictionary functionality, but most probably don’t need it. Which do you think would be more work?

So, for now, I gather that the on-screen keyboard is not functioning on WP (since SDL_HasScreenKeyboardSupport() returns false). Is there anything I can do to speed the implementation of this feature? It’s rather crucial to my port of OpenTyrian.

Malkierian wrote:

Hmm… Then I guess that the next option would be to create a custom keyboard. It likely wouldn’t be able to utilize dictionary functionality, but most probably don’t need it. Which do you think would be more work?

That’s a hard call. It depends on what you need, really.

I do suspect that on-screen keyboard support will eventually make it into the XAML integration I’m working on, but what I’m not sure is whether or not it’ll be possible to pop up the keyboard via programmatic means. One might have to display an OS-native text box first, which a user would have to click on. I’m not sure of this yet, though.

– David L.

Oh, man, that’s an ugly solution to think about… But, if it’s the best we can do, I’ll have to make do.

DLudwig wrote:

Malkierian wrote:

Hmm… Then I guess that the next option would be to create a custom keyboard. It likely wouldn’t be able to utilize dictionary functionality, but most probably don’t need it. Which do you think would be more work?

That’s a hard call. It depends on what you need, really.

I do suspect that on-screen keyboard support will eventually make it into the XAML integration I’m working on, but what I’m not sure is whether or not it’ll be possible to pop up the keyboard via programmatic means. One might have to display an OS-native text box first, which a user would have to click on. I’m not sure of this yet, though.

– David L.

By the way, how easy will it be to port a non-XAML project to the XAML-enabled setup once you get that side of it working? I’m guessing most code will run as-is, and it will just require changing the SDL library files and the main WP source file, right?

The forums seem to have bugged a bit, and all my posts have been posted again. There doesn’t seem to be a way for me to remove them.

Message-ID: <1428979272.m2f.47633 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

So, for now, I gather that the on-screen keyboard is not functioning on WP
(since SDL_HasScreenKeyboardSupport() returns false). Is there anything I
can do to speed the implementation of this feature? It’s rather crucial to
my port of OpenTyrian.

You could try to help (e.g. testing) implementing it (or pay someone
else to if you’re rich). Think of it as a form of debugging your port.> Date: Tue, 14 Apr 2015 02:41:12 +0000

From: “Malkierian”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] Windows Phone 8 SDL support

DLudwig wrote:

Thanks for the info, Sylvain! I’m on vacation, and my net access has been limited, otherwise I would’ve replied earlier. :slight_smile:

Limited support for SDL, SDL_mixer, and SDL_image is available for Windows Phone 8.0 and Windows Phone 8.1, as well as other platforms in the “WinRT” family (Windows 8.0, 8.1, and RT, inclusive). On Windows Phone, SDL support is currently limited to apps that don’t use Windows Phone’s native “XAML” based UI controls. Apps that only draw content, and process input with SDL should, however, be fine.

Here are a bunch of notes that I hope will help:

Regarding build environments: a copy of Visual C++ is required, at present. One of the free (cost-wise), “Express” editions should suffice.

The Windows Phone ports of SDL_mixer and SDL_image support a limited number of formats. Notably-supported formats include PNG, Jpeg, WebP, and Ogg Vorbis. If one of SDL_image or SDL_mixer’s usual file formats isn’t supported on Windows Phone (such as .mod, MIDI, and a bunch of others) and you need it, feel free to let me know and I’ll try adding it in.

Support for SDL_net on Windows Phone is not currently available, but in theory, could be possible. I can provide skeleton project files for such, if you’d like to try to get this up and running. Do note that such a port wouldn’t immediately work on Windows 8/8.1/RT, due to API limitations in the OS (assuming you’re interested in porting your app to those platforms as well, at some point).

Some limited documentation is available at http://bit.ly/1zVi3bC. Do note that it’s geared towards setting up a Windows 8 app, however the instructions for Windows Phone 8 are almost identical. Just be sure to start with Visual C++'s project files for Windows Phone 8, rather than the “Windows Store” app templates (which apply to Windows 8.x, and not Windows Phone).

Work on easier setup procedures (for SDL/Windows Phone apps) is on my to-do list (and will probably involve NuGet package management support, if possible), however I make no guarantees when that’ll be available. It won’t start until I get back from vacation and get settled back in, which shouldn’t be for another couple of weeks, at best. Feel free to ask questions in the meantime, if you run into trouble. :slight_smile:

Cheers!

  • David L.

Limanima wrote:

slvn wrote:

Hello,

Sorry, I saw your message on my mobile and I forgot answering.
The SDL does support Window Phone 8. you can find WP8 projet files
that are under mercurial.

SDL/VisualC-WinRT/WinPhone80_VS2012/
SDL/VisualC-WinRT/WinPhone81_VS2013/

The lib ttf, mixer, and image are also working.

Cheers,
Sylvain

Thanks! :smiley:
I’m certainly going to check that. I’ll only need mixer and image. Net would also be great, but it’s not mandatory.

Hi!
After some time away, I’m back. I’ve released my SDL game (android and ios) and now I’m back and try to get it to work on WP.
It’s been about a year I’ve been gone, but from what I remember there was a few issues with WP implementation with XAML.
David Ludwig, if you read this, can I get the latest version from your bitbucket repositor, or has it been merged with the main SDL mercurial repository?