Porting SDL2 App to Windows Store

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if someone
else has ported a SDL2 app to windows metro etc, I would be glad to get
pointers, gotchas etc.

Thanks for any suggestions!–
Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if someone
else has ported a SDL2 app to windows metro etc, I would be glad to get
pointers, gotchas etc.

Thanks for any suggestions!


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

SDL port for WinRT : https://bitbucket.org/DavidLudwig/sdl/wiki/Home

Cheers,
SylvainOn Wed, Dec 18, 2013 at 3:44 AM, Pallav Nawani wrote:

That’s great!
I look forward to trying it out!On Thu, Dec 19, 2013 at 3:29 PM, Sylvain Becker <sylvain.becker at gmail.com>wrote:

On Wed, Dec 18, 2013 at 3:44 AM, Pallav Nawani <@Pallav_Nawani>wrote:

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if someone
else has ported a SDL2 app to windows metro etc, I would be glad to get
pointers, gotchas etc.

Thanks for any suggestions!


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

SDL port for WinRT : https://bitbucket.org/DavidLudwig/sdl/wiki/Home

Cheers,
Sylvain


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

Would it be possible to fold this back into the main SDL codebase?On Thu, Dec 19, 2013 at 4:36 PM, Pallav Nawani <@Pallav_Nawani>wrote:

That’s great!
I look forward to trying it out!

On Thu, Dec 19, 2013 at 3:29 PM, Sylvain Becker <sylvain.becker at gmail.com>wrote:

On Wed, Dec 18, 2013 at 3:44 AM, Pallav Nawani <@Pallav_Nawani>wrote:

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if someone
else has ported a SDL2 app to windows metro etc, I would be glad to get
pointers, gotchas etc.

Thanks for any suggestions!


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

SDL port for WinRT : https://bitbucket.org/DavidLudwig/sdl/wiki/Home

Cheers,
Sylvain


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

this is David Ludwig the developer of this :)On Thu, Dec 19, 2013 at 1:30 PM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

On Thu, Dec 19, 2013 at 4:36 PM, Pallav Nawani wrote:

That’s great!
I look forward to trying it out!

On Thu, Dec 19, 2013 at 3:29 PM, Sylvain Becker <@Sylvain_Becker wrote:

On Wed, Dec 18, 2013 at 3:44 AM, Pallav Nawani wrote:

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if
someone else has ported a SDL2 app to windows metro etc, I would be glad to
get pointers, gotchas etc.

Thanks for any suggestions!


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

SDL port for WinRT : https://bitbucket.org/DavidLudwig/sdl/wiki/Home

Cheers,
Sylvain


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Sylvain Becker

I think this was in Ryan’s (ever expanding) to do list. Not really sure
when/if that will actually happen though.

2013/12/19 Pallav Nawani > Would it be possible to fold this back into the main SDL codebase?

On Thu, Dec 19, 2013 at 4:36 PM, Pallav Nawani wrote:

That’s great!
I look forward to trying it out!

On Thu, Dec 19, 2013 at 3:29 PM, Sylvain Becker <sylvain.becker at gmail.com wrote:

On Wed, Dec 18, 2013 at 3:44 AM, Pallav Nawani wrote:

Hi,

I have an SDL2 App running on Windows, Mac, iOS & Android.
Now I want to put it on Windows Store.

Does anyone have any pointers on porting to windows store, or if
someone else has ported a SDL2 app to windows metro etc, I would be glad to
get pointers, gotchas etc.

Thanks for any suggestions!


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,

SDL port for WinRT : https://bitbucket.org/DavidLudwig/sdl/wiki/Home

Cheers,
Sylvain


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Gabriel.

It’s on my TODO list, and there’s a Surface RT sitting on my desk
waiting for it.

–ryan.On 12/19/13, 7:30 AM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

Pallav Nawani wrote:

That’s great!I look forward to trying it out!

Cool. If you run into trouble, please let me know. The port’s still alpha-quality, at best, although at least a few apps have used it to get into the Windows Store.

An early setup guide is available at http://bit.ly/1fIa3ks.

Cheers,
– David L.

FYI, I’m starting to merge this into 2.0.3. :)On Thu, Dec 19, 2013 at 7:05 AM, Ryan C. Gordon wrote:

On 12/19/13, 7:30 AM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

It’s on my TODO list, and there’s a Surface RT sitting on my desk waiting
for it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s just plain awesome :)On Sun, Mar 9, 2014 at 11:20 PM, Sam Lantinga wrote:

FYI, I’m starting to merge this into 2.0.3. :slight_smile:

On Thu, Dec 19, 2013 at 7:05 AM, Ryan C. Gordon wrote:

On 12/19/13, 7:30 AM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

It’s on my TODO list, and there’s a Surface RT sitting on my desk waiting
for it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768

The latest snapshot has a D3D11 renderer for Windows 8. Feel free to poke
at it and submit fixes! :slight_smile:
http://www.libsdl.org/tmp/SDL-2.0.zipOn Mon, Mar 10, 2014 at 12:05 AM, Pallav Nawani wrote:

That’s just plain awesome :slight_smile:

On Sun, Mar 9, 2014 at 11:20 PM, Sam Lantinga <@slouken> wrote:

FYI, I’m starting to merge this into 2.0.3. :slight_smile:

On Thu, Dec 19, 2013 at 7:05 AM, Ryan C. Gordon wrote:

On 12/19/13, 7:30 AM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

It’s on my TODO list, and there’s a Surface RT sitting on my desk
waiting for it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Great, I will try it !
I will refresh my projects and switch to the SDL trunk for winrt !

It would be nice to have the satellite libraries updated / merged also?

SylvainOn Mon, Mar 10, 2014 at 10:25 AM, Sam Lantinga wrote:

The latest snapshot has a D3D11 renderer for Windows 8. Feel free to poke
at it and submit fixes! :slight_smile:
http://www.libsdl.org/tmp/SDL-2.0.zip

On Mon, Mar 10, 2014 at 12:05 AM, Pallav Nawani wrote:

That’s just plain awesome :slight_smile:

On Sun, Mar 9, 2014 at 11:20 PM, Sam Lantinga wrote:

FYI, I’m starting to merge this into 2.0.3. :slight_smile:

On Thu, Dec 19, 2013 at 7:05 AM, Ryan C. Gordon wrote:

On 12/19/13, 7:30 AM, Pallav Nawani wrote:

Would it be possible to fold this back into the main SDL codebase?

It’s on my TODO list, and there’s a Surface RT sitting on my desk
waiting for it.

–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
IronCode Gaming Private Limited
Website: http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming
Mobile: 9997478768


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Sylvain Becker

slvn wrote:

Great, I will try it !
I will refresh my projects and switch to the SDL trunk for winrt !

It would be nice to have the satellite libraries updated / merged also?

I’d suggest holding off on updating for a little bit longer. SDL/WinRT is now running via the latest code in SDL2’s mainline, however there’s a bug in its support for screen rotations. I’ll try to fix this within the next few days. No guarantees though.

As for satellite libraries, support for those is still pending. I’ll plan on looking into it once SDL/WinRT itself is completely back up and running. :slight_smile:

Cheers,
– David L.

DLudwig wrote:

slvn wrote:

Great, I will try it !
I will refresh my projects and switch to the SDL trunk for winrt !

It would be nice to have the satellite libraries updated / merged also?

I’d suggest holding off on updating for a little bit longer. SDL/WinRT is now running via the latest code in SDL2’s mainline, however there’s a bug in its support for screen rotations.

An update on this: screen/device rotation support is working again for SDL/WinRT, as of changeset 8621 (aka. 5252788cb448).

Cheers,
– David L.

Thank you for implementing D3D11 renderer.
I encountered a little issue: DXGI monitors application’s message queue and this behavior interferes with
SDL if the application already handles Alt-Enter sequence. I think it is necessary to disable this behavior (http://msdn.microsoft.com/en-us/library/windows/desktop/bb174540(v=vs.85).aspx).

— a/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:26:23 2014 +0430
+++ b/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:27:48 2014 +0430
@@ -1417,6 +1417,7 @@
WIN_SetErrorFromHRESULT(FUNCTION “, IDXGIFactory2::CreateSwapChainForHwnd”, result);
goto done;
}

  •    IDXGIFactory_MakeWindowAssociation(data->dxgiFactory, windowinfo.info.win.window, DXGI_MWA_NO_WINDOW_CHANGES);
    

#else
SDL_SetError(FUNCTION", Unable to find something to attach a swap chain to");
goto done;

Thanks for the suggestion. This has been implemented:
https://hg.libsdl.org/SDL/rev/763f551235afOn Mon, Mar 17, 2014 at 3:16 AM, Nader Golbaz wrote:

Thank you for implementing D3D11 renderer.
I encountered a little issue: DXGI monitors application’s message queue
and this behavior interferes with
SDL if the application already handles Alt-Enter sequence. I think it is
necessary to disable this behaviorhttp://msdn.microsoft.com/en-us/library/windows/desktop/bb174540(v=vs.85).aspx
.

— a/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:26:23 2014
+0430
+++ b/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:27:48 2014
+0430
@@ -1417,6 +1417,7 @@
WIN_SetErrorFromHRESULT(FUNCTION “,
IDXGIFactory2::CreateSwapChainForHwnd”, result);
goto done;
}

  • IDXGIFactory_MakeWindowAssociation(data->dxgiFactory,
    windowinfo.info.win.window, DXGI_MWA_NO_WINDOW_CHANGES);
    #else
    SDL_SetError(FUNCTION", Unable to find something to attach a swap
    chain to");
    goto done;

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

I have only upgraded lately to the latest version of the WinRT port :
all works perfectly, this is great work!

Two very small points :

1/ For Windows 8.1, Microsoft Certification tool reports to use the
"Trim()" function when DXGI devices are interrupting.
see http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx

2/ I upgraded also the satellite Libraries, and for SDL_ttf I got some trouble.
Microsoft compiler failed to compile the file “SDL_ttf.c” :
sdl_ttf\sdl_ttf.c(739): fatal error C1063: compiler limit : compiler
stack overflow

It only happens for ARM target, but whatever the optimisation
settings, and also for different versions of Freetype Library (FT
macros/structures could have changed …).
So this little patch did the trick …

@@ -736,7 +736,8 @@
}

     if (dst->rows != 0) {
  •        dst->buffer = (unsigned char *)malloc( dst->pitch * dst->rows );
    
  •        const size_t size_pitch_x_rows = dst->pitch * dst->rows;
    
  •        dst->buffer = (unsigned char *) malloc(size_pitch_x_rows);
           if ( !dst->buffer ) {
               return FT_Err_Out_Of_Memory;
           }
    

Thanks,

SylvainOn Mon, Mar 24, 2014 at 6:55 AM, Sam Lantinga wrote:

Thanks for the suggestion. This has been implemented:
https://hg.libsdl.org/SDL/rev/763f551235af

On Mon, Mar 17, 2014 at 3:16 AM, Nader Golbaz wrote:

Thank you for implementing D3D11 renderer.
I encountered a little issue: DXGI monitors application’s message queue
and this behavior interferes with
SDL if the application already handles Alt-Enter sequence. I think it is
necessary to disable this behavior.

— a/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:26:23 2014
+0430
+++ b/src/render/direct3d11/SDL_render_d3d11.c Sun Mar 16 16:27:48 2014
+0430
@@ -1417,6 +1417,7 @@
WIN_SetErrorFromHRESULT(FUNCTION “,
IDXGIFactory2::CreateSwapChainForHwnd”, result);
goto done;
}

  • IDXGIFactory_MakeWindowAssociation(data->dxgiFactory,
    windowinfo.info.win.window, DXGI_MWA_NO_WINDOW_CHANGES);
    #else
    SDL_SetError(FUNCTION", Unable to find something to attach a swap
    chain to");
    goto done;

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Sylvain Becker

slvn wrote:

1/ For Windows 8.1, Microsoft Certification tool reports to use the
"Trim()" function when DXGI devices are interrupting.
see http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx

Fixed as of https://hg.libsdl.org/SDL/rev/dd52820b7f5c, I think, although I haven’t had a chance to run it through the latest Store Certification Kit myself yet. (Last I tried for SDL/WinRT was the Windows 8.0 Certification Kit.)

Thanks much for the heads up on this! I’ll see if I can get a look at the 8.1 Certification Kit myself as soon as I can.

slvn wrote:

2/ I upgraded also the satellite Libraries, and for SDL_ttf I got some trouble.
Microsoft compiler failed to compile the file “SDL_ttf.c”

How did you upgrade the satellite libraries? WinRT-specific changes haven’t been applied to the copies on hg.libsdl.org, as of yet. :slight_smile:

– David L.

The Trim() commit makes the Windows Certication Kit 3.1 happy, so am I.
All looks good, I will try to submit apps again, later!

I already had the visual projects files for the satellite libraries for
winRT. And there are still working !
I only updated the sources of image/mixer/ttf from mercurial. (I have no
modification on the satellite libs, except the TTF compilation issue of the
previous email).

I can provide thoses project files, but I am not sure that the settings are
100% correct … let me know.
For external dependencies (zlib, ft, png, jpg, ogg, vorbis), I use WinRT
projects that were already provided in the source archives.

Thanks,

Sylvain.On Tue, Mar 25, 2014 at 4:01 AM, DLudwig wrote:

slvn wrote:

1/ For Windows 8.1, Microsoft Certification tool reports to use the
"Trim()" function when DXGI devices are interrupting.
see http://msdn.microsoft.com/en-us/library/windows/apps/Hh994929.aspx

Fixed as of https://hg.libsdl.org/SDL/rev/dd52820b7f5c, I think, although
I haven’t had a chance to run it through the latest Store Certification Kit
myself yet. (Last I tried for SDL/WinRT was the Windows 8.0 Certification
Kit.)

Thanks much for the heads up on this! I’ll see if I can get a look at the
8.1 Certification Kit myself as soon as I can.

slvn wrote:

2/ I upgraded also the satellite Libraries, and for SDL_ttf I got some
trouble.
Microsoft compiler failed to compile the file “SDL_ttf.c”

How did you upgrade the satellite libraries? WinRT-specific changes
haven’t been applied to the copies on hg.libsdl.org, as of yet. [image:
Smile]

– David L.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Sylvain Becker