Windows Phone 8 SDL support

Yeah, this is great to hear. Thanks for the info!

Sam Lantinga wrote:> Nice! Thanks for the update! :slight_smile:

On Fri, Jan 23, 2015 at 4:54 PM, Meldryt <herrdersuppen at gmail.com (herrdersuppen at gmail.com)> wrote:

  update: WP8.1 & SDL_net works for me with Windows 8.1 and Visual Studio 2013.

I can send and receive packets from Windows 7/MacOS/iOS/Android/Linux version of my app.

DLudwig wrote:

Limanima wrote:

Hi, Iā€™ve been away for sometime but Iā€™m back.
So SDL_Net is working? Iā€™m going to try that out.

Meanwhile my game is working on Windows Phone (with some limitations).
I still have a problem with the viewport aspect ratio that I have to fix.

Iā€™ll take this chance to make another question:
Is it possible to open a native pop up box on top of my app?

SDL_net is building successfully (for most WinRT platforms, including WinPhone 8+ ones), however itā€™s untested at runtime, at least from my end. Perhaps others have had luck with it? Regardless, if youā€™d like to try using it, a copy of this is available at https://bitbucket.org/DavidLudwig/sdl_net.

Regarding pop-ups, SDLā€™s message box API is working, with a caveat that there is a limitation on the number of buttons each message box can display. I believe itā€™s two for WinPhone and three for Win 8.x, but it might be vice-versa. Any more beyond that and Windows gets angry (and doesnā€™t display the message box).

Regarding pop-ups more complicated than simple message boxes, support for overlaying more complicated, Windows-native controls (via Windowsā€™ new-ish XAML APIs) is still pending. Iā€™ve started work on this, but itā€™s not quite ready for use just yet.

Cheers!
ā€“ David L.

Hi, is there any development on this: "Windows-native controls (via Windowsā€™ new-ish XAML APIs)"
Thanks!

Limanima wrote:

Hi, is there any development on this: ā€œWindows-native controls (via Windowsā€™ new-ish XAML APIs)ā€

There has been some development, but it has been somewhat slow going, in large part due to time constraints on my part. That being said, I do have some working, but not entirely feature-complete code ready. I donā€™t think that itā€™s quite ready to be pushed out to the main SDL repository, but Iā€™d be happy to post it in a separate repo, for the time being. I could definitely use some testers on this.

If youā€™re interested in an early version of XAML support, a few notes + warnings first:

  1. rendering + event-processing is, currently, callback-driven. I.e. instead of having a typical main loop like this:

Code:

while (AppIsRunning()) {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

ā€¦ youā€™ll have to have an app thatā€™s callback based, and is more like this, conceptually:

Code:

void AppTick() {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

void AppInit() {
/* <init sdl here, thenā€¦> */
AddAnimationCallback(&AppTick);
}

I think that the former style will eventually be possible, but due to thread-related limitations in the XAML APIs, itā€™s somewhat tricky.

  1. keyboard input is currently non-functional. I suspect that this will work, eventually.

  2. OpenGL ES rendering is currently non-function. I suspect that this will also work, eventually. SDL_Renderer support is working though.

Let me know if youā€™re interested, and Iā€™ll plan on putting current work online at some point in the next week or two.

Cheers,
ā€“ David L.

DLudwig wrote:

If youā€™re interested in an early version of XAML support, a few notes + warnings first:

Additional notes:

  1. For now, youā€™ll have to create the XAML controls yourself (in Visual Studio, for example), then pass a pointer to the control into SDL, via SDL_CreateWindowFrom. It might be possible to eventually have SDL create a base set of XAML controls, but for now, the implementation assumes that one creates this ahead of time, either by hand, and/or through Visual Studioā€™s XAML layout tools.

  2. Support is currently limited to Windows Phone 8.1 (and Windows 8.1). It uses the ā€œSwapChainPanelā€ XAML control, which was added as part of Win[Phone] 8.1.

  3. Support for Windows Phone 8.0 is not available. WinPhone 8.0 used a vastly different XAML/Direct3D interop API, one that I believe has been deprecated, and is trickier to initialize from C/C++ code (than newer APIs that were introduced in Win[Phone] 8.1). I donā€™t have any plans, as of yet, to write support for this, especially given that WinPhone 8.1ā€™s usage is now higher than WinPhone 8.0ā€™s. (Non-XAML support is still available in SDL2 for WinPhone 8.0, however.)

ā€“ David L.

DLudwig wrote:

Limanima wrote:

Hi, is there any development on this: ā€œWindows-native controls (via Windowsā€™ new-ish XAML APIs)ā€

There has been some development, but it has been somewhat slow going, in large part due to time constraints on my part. That being said, I do have some working, but not entirely feature-complete code ready. I donā€™t think that itā€™s quite ready to be pushed out to the main SDL repository, but Iā€™d be happy to post it in a separate repo, for the time being. I could definitely use some testers on this.

If youā€™re interested in an early version of XAML support, a few notes + warnings first:

  1. rendering + event-processing is, currently, callback-driven. I.e. instead of having a typical main loop like this:

Code:

while (AppIsRunning()) {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

ā€¦ youā€™ll have to have an app thatā€™s callback based, and is more like this, conceptually:

Code:

void AppTick() {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

void AppInit() {
/* <init sdl here, thenā€¦> */
AddAnimationCallback(&AppTick);
}

I think that the former style will eventually be possible, but due to thread-related limitations in the XAML APIs, itā€™s somewhat tricky.

  1. keyboard input is currently non-functional. I suspect that this will work, eventually.

  2. OpenGL ES rendering is currently non-function. I suspect that this will also work, eventually. SDL_Renderer support is working though.

Let me know if youā€™re interested, and Iā€™ll plan on putting current work online at some point in the next week or two.

Cheers,
ā€“ David L.

Well, my game fully depends on Open GL ES for rendering. My main interest in XAML controls is because I need to display a few message boxes. Maybe I can get away with the SDL message box.
My game is out for iOS and Android. Iā€™m really interested on geting it in the Windows Phone too. It is actually working on WP, but I have some rendering issues and Iā€™m not displaying the message boxes.

Limanima wrote:

DLudwig wrote:

Limanima wrote:

Hi, is there any development on this: ā€œWindows-native controls (via Windowsā€™ new-ish XAML APIs)ā€

There has been some development, but it has been somewhat slow going, in large part due to time constraints on my part. That being said, I do have some working, but not entirely feature-complete code ready. I donā€™t think that itā€™s quite ready to be pushed out to the main SDL repository, but Iā€™d be happy to post it in a separate repo, for the time being. I could definitely use some testers on this.

If youā€™re interested in an early version of XAML support, a few notes + warnings first:

  1. rendering + event-processing is, currently, callback-driven. I.e. instead of having a typical main loop like this:

Code:

while (AppIsRunning()) {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

ā€¦ youā€™ll have to have an app thatā€™s callback based, and is more like this, conceptually:

Code:

void AppTick() {
ProcessEvents();
UpdateStuff();
RenderStuff();
}

void AppInit() {
/* <init sdl here, thenā€¦> */
AddAnimationCallback(&AppTick);
}

I think that the former style will eventually be possible, but due to thread-related limitations in the XAML APIs, itā€™s somewhat tricky.

  1. keyboard input is currently non-functional. I suspect that this will work, eventually.

  2. OpenGL ES rendering is currently non-function. I suspect that this will also work, eventually. SDL_Renderer support is working though.

Let me know if youā€™re interested, and Iā€™ll plan on putting current work online at some point in the next week or two.

Cheers,
ā€“ David L.

Well, my game fully depends on Open GL ES for rendering. My main interest in XAML controls is because I need to display a few message boxes. Maybe I can get away with the SDL message box.
My game is out for iOS and Android. Iā€™m really interested on geting it in the Windows Phone too. It is actually working on WP, but I have some rendering issues and Iā€™m not displaying the message boxes.

Forgot to add a few things: The main loop you described seems to be like the one in iOS. It works with a callback.
On Windows Phone Iā€™m actually rendering using Direct3d.

Limanima, if your game depends on OpenGL ES, then you can use ANGLE (https://github.com/MSOpenTech/angle/issues/32). There is XAML template in repository. I ported my game to windows 8.1, using SDL and ANGLE XAML template, with xaml controls too. You could use their project template without creating SDL window, but you need add your own handlers to process touch events (and may be suspend/restore), like this

Code:
void OpenGLESPage::OnPointerPressed(Platform::Object^ sender, PointerEventArgs^ e)
{
e->Handled = true;
Windows::UI::Input::PointerPoint ^ point = e->CurrentPoint;
Uint8 sdlButton = GetSDLButtonForPointer(point);

if(sdlButton != SDL_BUTTON_LEFT)
{
	return;
}

SDL_Event event;
event.type = SDL_MOUSEBUTTONDOWN;
event.button.windowID = 0;
event.button.which = 0;
event.button.state = SDL_PRESSED;
event.button.button = sdlButton;
event.button.clicks = 1;
event.button.x = point->Position.X;
event.button.y = point->Position.Y;
SDL_PushEvent(&event);

LogLastMouseEvent(event);

}

One more thing, ARM builds are currently unplayable, because of some limitations - https://github.com/MSOpenTech/angle/issues/32.

asdron wrote:

Limanima, if your game depends on OpenGL ES, then you can use ANGLE (https://github.com/MSOpenTech/angle/issues/32). There is XAML template in repository. I ported my game to windows 8.1, using SDL and ANGLE XAML template, with xaml controls too. You could use their project template without creating SDL window, but you need add your own handlers to process touch events (and may be suspend/restore), like this

Code:
void OpenGLESPage::OnPointerPressed(Platform::Object^ sender, PointerEventArgs^ e)
{
e->Handled = true;
Windows::UI::Input::PointerPoint ^ point = e->CurrentPoint;
Uint8 sdlButton = GetSDLButtonForPointer(point);

if(sdlButton != SDL_BUTTON_LEFT)
{
return;
}

SDL_Event event;
event.type = SDL_MOUSEBUTTONDOWN;
event.button.windowID = 0;
event.button.which = 0;
event.button.state = SDL_PRESSED;
event.button.button = sdlButton;
event.button.clicks = 1;
event.button.x = point->Position.X;
event.button.y = point->Position.Y;
SDL_PushEvent(&event);

LogLastMouseEvent(event);
}

One more thing, ARM builds are currently unplayable, because of some limitations - https://github.com/MSOpenTech/angle/issues/32.

Does this problem happen with Direct3d too? I have different renderers for ioS/Android (OpenGL ES) and Windows Phone (Direct 3D)?

DLudwig wrote:

Limanima wrote:

Well, my game fully depends on Open GL ES for rendering. My main interest in XAML controls is because I need to display a few message boxes. Maybe I can get away with the SDL message box.
My game is out for iOS and Android. Iā€™m really interested on geting it in the Windows Phone too. It is actually working on WP, but I have some rendering issues and Iā€™m not displaying the message boxes.

There is limited support for SDLā€™s message-box API in SDL/WinRT. On Windows Phone, due to platform limitations, itā€™s currently limited to showing message boxes with two buttons, and no-colorization. If thatā€™s ok for you, then Iā€™d say go for it. Itā€™d probably be a lot simpler than adopting XAML. :slight_smile:

If you end up wanting/needing XAML support, Iā€™ve posted my on-going work at https://bitbucket.org/davidludwig/sdl . Iā€™ve added the aforementioned SDL_CreateWindowFrom() modifications, as well as a new function to setup a rendering callback from C code. That new function is, to note, ā€˜int SDL_WinRTXAMLSetAnimationCallback(void (callback)(void), void *callbackParam);ā€™. Using it should, in theory, be akin to using SDL_iPhoneSetAnimationCallback, but with less parameters.

No OpenGL support just yet, but Iā€™ll try getting to that ASAP. I have some code for that in the works, but itā€™s not quite working just yet. Iā€™ll give it another shot in the next week or two. No guarantees though. :-/

Regarding custom rendering, in theory, it should be possible to setup Direct3D 11 independently of SDL, even with the new XAML code. Just create your swap chain, passing in the SwapChainPanel as input instead of the CoreWindow. If you could use some sample code there, thereā€™s some scattered on MSDN. SDLā€™s D3D11 renderer (in that unofficial repo) has some as well (look for ā€˜D3D11_CreateSwapChainā€™). Just note, SDLā€™s video APIs are pretty much limited to being run on the appā€™s UI thread for now (when using XAML support).

If you use it, and run into any problems with it, or have questions, let me know and Iā€™ll try to address them.

Cheers!
ā€“ David L.

Yes, maybe I can get away with the SDLā€™s Message Box. Iā€™m using message boxes to display some network errors when accessing leaderboards (which Iā€™m not going to support in the Windows Phone version). So I guess I will not need message boxes.
I have just a few rendering bugs to solve and the game will be ready on Windows Phone too.

Limanima wrote:

DLudwig wrote:

Limanima wrote:

Well, my game fully depends on Open GL ES for rendering. My main interest in XAML controls is because I need to display a few message boxes. Maybe I can get away with the SDL message box.
My game is out for iOS and Android. Iā€™m really interested on geting it in the Windows Phone too. It is actually working on WP, but I have some rendering issues and Iā€™m not displaying the message boxes.

There is limited support for SDLā€™s message-box API in SDL/WinRT. On Windows Phone, due to platform limitations, itā€™s currently limited to showing message boxes with two buttons, and no-colorization. If thatā€™s ok for you, then Iā€™d say go for it. Itā€™d probably be a lot simpler than adopting XAML. :slight_smile:

If you end up wanting/needing XAML support, Iā€™ve posted my on-going work at https://bitbucket.org/davidludwig/sdl . Iā€™ve added the aforementioned SDL_CreateWindowFrom() modifications, as well as a new function to setup a rendering callback from C code. That new function is, to note, ā€˜int SDL_WinRTXAMLSetAnimationCallback(void (callback)(void), void *callbackParam);ā€™. Using it should, in theory, be akin to using SDL_iPhoneSetAnimationCallback, but with less parameters.

No OpenGL support just yet, but Iā€™ll try getting to that ASAP. I have some code for that in the works, but itā€™s not quite working just yet. Iā€™ll give it another shot in the next week or two. No guarantees though. :-/

Regarding custom rendering, in theory, it should be possible to setup Direct3D 11 independently of SDL, even with the new XAML code. Just create your swap chain, passing in the SwapChainPanel as input instead of the CoreWindow. If you could use some sample code there, thereā€™s some scattered on MSDN. SDLā€™s D3D11 renderer (in that unofficial repo) has some as well (look for ā€˜D3D11_CreateSwapChainā€™). Just note, SDLā€™s video APIs are pretty much limited to being run on the appā€™s UI thread for now (when using XAML support).

If you use it, and run into any problems with it, or have questions, let me know and Iā€™ll try to address them.

Cheers!
ā€“ David L.

Yes, maybe I can get away with the SDLā€™s Message Box. Iā€™m using message boxes to display some network errors when accessing leaderboards (which Iā€™m not going to support in the Windows Phone version). So I guess I will not need message boxes.
I have just a few rendering bugs to solve and the game will be ready on Windows Phone too.

Now I remember why I really need xaml! I want to integrate Google AdMob on Windows Phone too (I already have AdMob working on iOS/Android).
Do you think it will be possible to integrate that? Iā€™m almost sure I will have to go the xaml way.

Limanima wrote:

Now I remember why I really need xaml! I want to integrate Google AdMob on Windows Phone too (I already have AdMob working on iOS/Android).
Do you think it will be possible to integrate that? Iā€™m almost sure I will have to go the xaml way.

Maybe? Iā€™ve never worked with AdMob on Windows Phone before, and canā€™t tell if itā€™ll work or not.

My guess is that if AdMob works fine with a SwapChainPanel, itā€™ll work fine with what Iā€™m working on. I vaguely recall someone at Microsoft saying, via a Github-hosted site for ANGLE/WinRT, that ANGLE + SwapChainPanel + AdMob worked for them, but Iā€™m not certain of that.

ā€“ David L.

DLudwig wrote:

Limanima wrote:

Now I remember why I really need xaml! I want to integrate Google AdMob on Windows Phone too (I already have AdMob working on iOS/Android).
Do you think it will be possible to integrate that? Iā€™m almost sure I will have to go the xaml way.

Maybe? Iā€™ve never worked with AdMob on Windows Phone before, and canā€™t tell if itā€™ll work or not.

My guess is that if AdMob works fine with a SwapChainPanel, itā€™ll work fine with what Iā€™m working on. I vaguely recall someone at Microsoft saying, via a Github-hosted site for ANGLE/WinRT, that ANGLE + SwapChainPanel + AdMob worked for them, but Iā€™m not certain of that.

ā€“ David L.

Iā€™m going to take a look at the AdMob api for Windows Phone. I have no idea how that works.

Limanima wrote:

DLudwig wrote:

Limanima wrote:

Now I remember why I really need xaml! I want to integrate Google AdMob on Windows Phone too (I already have AdMob working on iOS/Android).
Do you think it will be possible to integrate that? Iā€™m almost sure I will have to go the xaml way.

Maybe? Iā€™ve never worked with AdMob on Windows Phone before, and canā€™t tell if itā€™ll work or not.

My guess is that if AdMob works fine with a SwapChainPanel, itā€™ll work fine with what Iā€™m working on. I vaguely recall someone at Microsoft saying, via a Github-hosted site for ANGLE/WinRT, that ANGLE + SwapChainPanel + AdMob worked for them, but Iā€™m not certain of that.

ā€“ David L.

Iā€™m going to take a look at the AdMob api for Windows Phone. I have no idea how that works.

Alright, the AdMob is API is a C# component. Itā€™s seems to be very easy to integrate, and only a few lines of code are needed.

Here is the code:

  AdView bannerAd = new AdView
  {
    Format = AdFormats.BANNER,
    AdUnitID = "MY_AD_UNIT_ID"
  };
  AdRequest adRequest = new AdRequest();
  // Assumes we've defined a Grid that has a name
  // directive of ContentPanel.
  ContentPanel.Children.Add(bannerAd);
  bannerAd.LoadAd(adRequest);

It seems that the ad is displayed in a web browser control that has to be attached to a xaml control.
My doubts with this are:

-Is is possible to call C# code from c++?
-Can I have access to any child control created by SDL that I can use to attach the AdView?

I have this feeling that it will be hard to make this work.
For starters a regular c++ project will not suffice. Iā€™ll have to create a C# XAML app. Iā€™m unable to add a reference to the C# AdMob component from a c++ project.
Thereā€™s a project template in VS 2013 that creates a C# XMAL app that uses Direct 3D thru a C++ component, so I guess it will be possible to use SDL with a c# app.

Limanima wrote:

Alright, the AdMob is API is a C# component. Itā€™s seems to be very easy to integrate, and only a few lines of code are needed.

Limanima wrote:

It seems that the ad is displayed in a web browser control that has to be attached to a xaml control.
My doubts with this are:

-Is is possible to call C# code from c++?
-Can I have access to any child control created by SDL that I can use to attach the AdView?

I have this feeling that it will be hard to make this work.
For starters a regular c++ project will not suffice. Iā€™ll have to create a C# XAML app. Iā€™m unable to add a reference to the C# AdMob component from a c++ project.
Thereā€™s a project template in VS 2013 that creates a C# XMAL app that uses Direct 3D thru a C++ component, so I guess it will be possible to use SDL with a c# app.

A few notes on this:

  1. Their sample code is in C#, but Microsoftā€™s most recent XAML framework, on Windows Phone 8.1, allows controls to be written in one of a few languages (that WinRT supports), then lets any WinRT language use them. Assuming the AdMob API uses WinRT XAML, and not an older, non-WinRT iteration of XAML, you might just be able to create and include the control from C++. (I.e. within WinRT, it is possible to do cross-language calls, but I suspect itā€™s possible to integrate an SDK like this without doing such, although I might be mistaken. :-/ )

  2. My current SDL/WinRT+XAML work doesnā€™t do anything, per-se, to create XAML controls. It currently requires that a ā€˜SwapChainPanelā€™ XAML control be created first, then it allows SDL to work with it. I.e. in this case, for the time being, you could create the controls yourself, then hook up SDL to the appropriate one.

Make sense?

DLudwig wrote:

A few notes on this:

  1. Their sample code is in C#, but Microsoftā€™s most recent XAML framework, on Windows Phone 8.1, allows controls to be written in one of a few languages (that WinRT supports), then lets any WinRT language use them. Assuming the AdMob API uses WinRT XAML, and not an older, non-WinRT iteration of XAML, you might just be able to create and include the control from C++. (I.e. within WinRT, it is possible to do cross-language calls, but I suspect itā€™s possible to integrate an SDK like this without doing such, although I might be mistaken. :-/ )

  2. My current SDL/WinRT+XAML work doesnā€™t do anything, per-se, to create XAML controls. It currently requires that a ā€˜SwapChainPanelā€™ XAML control be created first, then it allows SDL to work with it. I.e. in this case, for the time being, you could create the controls yourself, then hook up SDL to the appropriate one.

Make sense?

It probably does! :smiley:
Iā€™ve downloaded your SDL source and Iā€™m going to download the SDLWinRTTestApp and run a few tests.

Limanima wrote:

Iā€™ve downloaded your SDL source and Iā€™m going to download the SDLWinRTTestApp and run a few tests.

SDLWinRTTestApp doesnā€™t yet have XAML test code in it. Itā€™s also got a lot of cruft, largely used by me to test various things in and around SDL.

Iā€™ve posted a simpler, XAML-specific, skeleton project at: https://bitbucket.org/DavidLudwig/sdlskeletonxaml81 . Itā€™s basically MSVCā€™s Universal (for Windows 8.1 and Windows Phone 8.1) ā€œBlank Appā€ template, with a few minor modifications, and a tiny bit of sample SDL code. When run, itā€™ll attempt to use SDL to clear the screen to a solid green color.

Cheers!
ā€“ David L.

DLudwig wrote:

Limanima wrote:

Iā€™ve downloaded your SDL source and Iā€™m going to download the SDLWinRTTestApp and run a few tests.

SDLWinRTTestApp doesnā€™t yet have XAML test code in it. Itā€™s also got a lot of cruft, largely used by me to test various things in and around SDL.

Iā€™ve posted a simpler, XAML-specific, skeleton project at: https://bitbucket.org/DavidLudwig/sdlskeletonxaml81 . Itā€™s basically MSVCā€™s Universal (for Windows 8.1 and Windows Phone 8.1) ā€œBlank Appā€ template, with a few minor modifications, and a tiny bit of sample SDL code. When run, itā€™ll attempt to use SDL to clear the screen to a solid green color.

Cheers!
ā€“ David L.

Iā€™m checking that out as we speak. Thanks!

Limanima wrote:

DLudwig wrote:

Limanima wrote:

Iā€™ve downloaded your SDL source and Iā€™m going to download the SDLWinRTTestApp and run a few tests.

SDLWinRTTestApp doesnā€™t yet have XAML test code in it. Itā€™s also got a lot of cruft, largely used by me to test various things in and around SDL.

Iā€™ve posted a simpler, XAML-specific, skeleton project at: https://bitbucket.org/DavidLudwig/sdlskeletonxaml81 . Itā€™s basically MSVCā€™s Universal (for Windows 8.1 and Windows Phone 8.1) ā€œBlank Appā€ template, with a few minor modifications, and a tiny bit of sample SDL code. When run, itā€™ll attempt to use SDL to clear the screen to a solid green color.

Cheers!
ā€“ David L.

Iā€™m checking that out as we speak. Thanks!

Alright, I think Iā€™m on the right path. Your template was of much help.
I had to do a few things though. Update from VS2012 to VS2013. My projects were targeting wp 8.0, I had to create new ones to target wp 8.1.
Iā€™m starting to get this xaml thing.

DLudwig wrote:

Limanima wrote:

Iā€™ve downloaded your SDL source and Iā€™m going to download the SDLWinRTTestApp and run a few tests.

SDLWinRTTestApp doesnā€™t yet have XAML test code in it. Itā€™s also got a lot of cruft, largely used by me to test various things in and around SDL.

Iā€™ve posted a simpler, XAML-specific, skeleton project at: https://bitbucket.org/DavidLudwig/sdlskeletonxaml81 . Itā€™s basically MSVCā€™s Universal (for Windows 8.1 and Windows Phone 8.1) ā€œBlank Appā€ template, with a few minor modifications, and a tiny bit of sample SDL code. When run, itā€™ll attempt to use SDL to clear the screen to a solid green color.

Cheers!
ā€“ David L.

Iā€™ve been quite busy between my website, supporting my just released game, getting my other game ready to be released on Steam that I almost have no time to get back to this.
But Iā€™ve made a few tests, but Iā€™m unable to get the thing to work.
SDL_CreateRenderer is failing. Iā€™ve tried it on your template project and it is also failing with the same error. Iā€™ve stepped into SDL_CreateRenderer and the function that is failing is IDXGIFactory2_CreateSwapChainForComposition.
This is the error message(hresult=0x887a0001)

ā€œThe application made a call that is invalid. Either the parameters of the call or the state of some object was incorrect.\r\nEnable the D3D debug layer in order to see details via debug messagesā€

Iā€™ve already enabled d3d debug layer but I canā€™t see any additional information.

Iā€™m running a ARM build on a Lumia 520. Not sure if that matters. Any ideas?

Limanima wrote:

Iā€™m running a ARM build on a Lumia 520. Not sure if that matters. Any ideas?

What version of Windows Phone do you have on the 520? Is it 8.1 or above?

Also, what revision of the code are you at (in Mercurial)?