No description
Find a file
David Ludwig cba7a719d8 WinRT: bug and data-integrity fixes for SDL_GetPrefPath()
This change does a few things, all with regards to the WinRT implementation of
SDL_GetPrefPath():

1. it fixes a bug whereby SDL_GetPrefPath() did not create the directory it
returned.  On other SDL platforms, SDL_GetPrefPath() will create separate
directories for its 'org' and 'app' folders.  Without this, attempts to create
files in the pref-path would fail, unless those directories were first created
by the app, or by some other library the app used.  This change makes sure
that these directories get created, before SDL_GetPrefPath() returns to its
caller(s).


2. it defaults to having SDL_GetPrefPath() return a WinRT 'Local' folder
on all platforms.  Previously, for Windows Store apps, it would have used a
different, 'Roaming' folder.  Files in Roaming folders can be automatically,
and synchronized across multiple devices by Windows.  This synchronization can
happen while the app runs, with new files being copied into a running app's
pref-path.  Unless an app is specifically designed to handle this scenario,
there is a chance that save-data could be overwritten in unwanted or
unexpected ways.

The default is now to use a Local folder, which does not get synchronized, and
which is arguably a bit safer to use.  Apps that wish to use Roaming folders
can do so by setting SDL_HINT_WINRT_PREF_PATH_ROOT to "roaming", however it
is recommended that one first read Microsoft's documentation for Roaming
files, a link to which is provided in README-winrt.md.

To preserve older pref-path selection behavior (found in SDL 2.0.3, as well as
many pre-2.0.4 versions of SDL from hg.libsdl.org), which uses a Roaming path
in Windows Store apps, and a Local path in Windows Phone, set
SDL_HINT_WINRT_PREF_PATH_ROOT to "old".

Please note that Roaming paths are not supported on Windows Phone 8.0, due to
limitations in the OS itself.  Attempts to use this will fail.
(Windows Phone 8.1 does not have this limitation, however.)


3. It makes SDL_GetPrefPath(), when on Windows Phone 8.0, and when
SDL_HINT_WINRT_PREF_PATH_ROOT is set to "roaming", return NULL, rather than
silently defaulting to a Local path (then switching to a Roaming path if and
when the user upgraded to Windows Phone 8.1).
2014-11-29 10:09:30 -05:00
acinclude We have to fix the DLL name convention on Windows every time... 2012-10-19 21:43:41 -07:00
android-project Added name for second Java Thread on Android. 2014-11-23 20:35:51 +01:00
build-scripts Fixed gcc-fat.sh failing to build Objective-C sources correctly. 2014-11-14 11:21:15 -05:00
cmake Fixed syntax error in cmake file. 2014-10-17 23:10:33 +02:00
debian Added libibus-1.0-dev build dependency 2014-06-21 17:31:36 -07:00
docs WinRT: bug and data-integrity fixes for SDL_GetPrefPath() 2014-11-29 10:09:30 -05:00
include WinRT: bug and data-integrity fixes for SDL_GetPrefPath() 2014-11-29 10:09:30 -05:00
premake Fixed bug 2696 - Mac: fix display mode refresh rate calculation 2014-08-23 10:47:50 -07:00
src WinRT: bug and data-integrity fixes for SDL_GetPrefPath() 2014-11-29 10:09:30 -05:00
test add "i" shortcut to testgesture tool to log # of fingers down on the touch devices. 2014-11-23 15:39:28 -05:00
VisualC Turned on OmitDefaultLibName for SDL, SDLmain and SDLtest 2014-07-27 19:56:53 -07:00
VisualC-WinRT WinRT: enabled OpenGL ES 2 support on Windows Phone 2014-11-02 10:32:25 -05:00
visualtest Don't crash when no WM is present. 2013-11-27 10:29:27 -08:00
Xcode add controllermap program to SDLTest xcode project 2014-11-23 15:21:49 -05:00
Xcode-iOS Fixed bug 2626 - iOS: fix test and template Xcode projects and build scripts to link with CoreMotion 2014-07-07 10:42:19 -07:00
.hgignore Added audio device buffer queueing API. 2014-07-22 21:41:49 -04:00
.hgtags Added tag release-2.0.3 for changeset 704a0bfecf75 2014-03-15 19:31:20 -07:00
Android.mk Implemented SDL_GetPrefPath() on Android - it returns the path used by SDL_AndroidGetInternalStoragePath() 2014-08-11 17:25:53 -07:00
autogen.sh Need to generate aclocal.m4 when rebuilding configure, but we don't need to check it in. 2013-05-26 16:01:40 -07:00
BUGS.txt Credits were truncated in a previous commit. 2013-05-27 21:44:16 -07:00
cmake_uninstall.cmake.in Add suport for "make uninstall" to cmake. 2014-06-16 10:58:09 -03:00
CMakeLists.txt Expanded the iMX6 video driver into a general Vivante video driver that works across multiple SoCs 2014-10-15 09:18:17 -07:00
configure Updated configure based on recent configure.in changes 2014-10-15 16:26:51 +00:00
configure.in Expanded the iMX6 video driver into a general Vivante video driver that works across multiple SoCs 2014-10-15 09:18:17 -07:00
COPYING.txt Fixed bug 2374 - Update copyright for 2014... 2014-02-02 00:53:27 -08:00
CREDITS.txt Added Julian Winter to the credits for the SDL 2.0 website. 2013-08-12 08:45:37 -07:00
INSTALL.txt Moved documentation to docs, recreated a simple README.txt, fixed build 2014-07-29 08:04:15 -07:00
Makefile.in Make autoconf-based build quiet by default. 2014-06-19 00:40:09 -04:00
Makefile.minimal Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Makefile.pandora Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Makefile.psp Added SDL_GetBasePath() and SDL_GetPrefPath() in new filesystem module. 2013-08-20 19:57:11 -04:00
Makefile.wiz
README-SDL.txt Moved documentation to docs, recreated a simple README.txt, fixed build 2014-07-29 08:04:15 -07:00
README.txt Moved documentation to docs, recreated a simple README.txt, fixed build 2014-07-29 08:04:15 -07:00
sdl2-config.in Revert fix for bug 1392 because it breaks linking with mingw32 2013-10-21 10:28:57 -07:00
sdl2.m4 Fixed bug 1976 - SDL2.m4 shares same variables as SDL.m4 so they cache values 2013-07-21 11:52:16 -07:00
sdl2.pc.in Revert fix for bug 1392 because it breaks linking with mingw32 2013-10-21 10:28:57 -07:00
SDL2.spec.in Renamed documentation files to .txt and converted them to DOS line endings so they would open properly on all systems. 2013-05-26 11:06:17 -07:00
TODO.txt Added __WINDOWS__ to reflect both 32 and 64-bit windows platforms 2013-10-20 20:41:30 -07:00
VisualC.html Fixed nesting of HTML elements in documentation. 2014-06-09 17:37:59 +02:00
WhatsNew.txt Chrome's Native Client backend implementation 2014-06-06 15:45:59 -03:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
http://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)