sdl2_frt/test
Sam Lantinga 658975f381 Fixed bug 3639 - SDL_GetPrefPath returns a path with two consecutive slashes on Unix if org is omitted
Fabian Greffrath

we use SDL_GetPrefPath() in Chocolate Doom to get a reasonable directory to save and restore config files and savegames:

https://github.com/chocolate-doom/chocolate-doom/blob/sdl2-branch/src/m_config.c#L2162

However, since there is no "organization" behind Chocolate Doom and there is really only one "product" called Chocolate Doom, we pass an empty string for the org parameter and the package string for app.

This leads to two consecutive slashes in the path returned by SDL_GetPrefPath() like this:

/home/user/.local/share//chocolate-doom/

While this is harmless, it sure looks bad.

I believe that it should be possible to either pass a NULL pointer for the org parameter or at least have the function detect an empty string as a means to express "there is no origanization, just a single product". The generation of the path string to be returned by the function will have to get adapted accordingly.
2017-08-11 11:32:00 -07:00
..
emscripten
nacl
shapes
acinclude.m4
aclocal.m4
autogen.sh
axis.bmp
button.bmp
checkkeys.c Fixed bug 3682 - Toggle text input in checkkeys when the mouse is clicked 2017-08-11 10:32:47 -07:00
configure mistake: Revert the files that I did not mean to commit 2017-03-01 15:05:54 -08:00
configure.in
controllermap.bmp
controllermap.c Fixed warning about implicit conversion in controllermap program. 2017-03-04 23:05:47 +01:00
COPYING
gcc-fat.sh
icon.bmp
loopwave.c Removed unused signal includes and handler in test programs. 2017-05-20 23:30:32 +02:00
loopwavequeue.c Removed unused field in loopwavequeue program. 2017-04-29 22:50:23 +02:00
Makefile.in test: Makefile.in should copy bitmap and wave files to build directory. 2017-05-29 18:24:06 -04:00
moose.dat
picture.xbm
README Backed out changeset e3fcdad257fc - testaudiocapture.c already does what we want 2017-03-16 16:45:12 -07:00
relative_mode.markdown
sample.bmp
sample.wav
testatomic.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testaudiocapture.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testaudiohotplug.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testaudioinfo.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testautomation_audio.c
testautomation_clipboard.c Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
testautomation_events.c
testautomation_hints.c
testautomation_keyboard.c Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
testautomation_main.c
testautomation_mouse.c
testautomation_pixels.c
testautomation_platform.c Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
testautomation_rect.c
testautomation_render.c
testautomation_rwops.c Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
testautomation_sdltest.c
testautomation_stdlib.c Fixed a bunch of compiler warnings in the test code. 2017-01-07 22:24:45 -05:00
testautomation_suites.h
testautomation_surface.c
testautomation_syswm.c
testautomation_timer.c
testautomation_video.c
testautomation.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testbounds.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testcustomcursor.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testdisplayinfo.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testdraw2.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testdrawchessboard.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testdropfile.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testerror.c Removed unused signal includes and handler in test programs. 2017-05-20 23:30:32 +02:00
testfile.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testfilesystem.c Fixed bug 3639 - SDL_GetPrefPath returns a path with two consecutive slashes on Unix if org is omitted 2017-08-11 11:32:00 -07:00
testgamecontroller.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testgesture.c Removed unused constant in testgesture program. 2017-03-19 22:16:37 +01:00
testgl2.c Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
testgles2.c Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
testgles.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testhaptic.c
testhittesting.c
testhotplug.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testiconv.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testime.c Fixed typo in log message in testime program. 2017-07-09 23:00:35 +02:00
testintersections.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testjoystick.c Added support for the HOTAS Warthog throttle 2017-01-31 12:23:29 -08:00
testkeys.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testloadso.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testlock.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testmessage.c Removed unused signal includes and handler in test programs. 2017-05-20 23:30:32 +02:00
testmultiaudio.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testnative.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testnative.h Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testnativecocoa.m
testnativew32.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testnativex11.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testoverlay2.c Removed unnecessary call to free() in testoverlay2 program. 2017-05-20 23:30:47 +02:00
testplatform.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testpower.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testqsort.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testrelative.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testrendercopyex.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testrendertarget.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testresample.c testresample: write correct length to the .wav header. 2017-01-09 15:56:11 -05:00
testrumble.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testscale.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testsem.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testshader.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testshape.c Fixed handling only one event per frame in testshape program. 2017-06-24 23:45:19 +02:00
testsprite2.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testspriteminimal.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
teststreaming.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testthread.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testtimer.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testver.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testviewport.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
testwm2.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
torturethread.c Updated copyright for 2017 2017-01-01 18:33:28 -08:00
utf8.txt

These are test programs for the SDL library:

	checkkeys	Watch the key events to check the keyboard
	loopwave	Audio test -- loop playing a WAV file
	loopwavequeue	Audio test -- loop playing a WAV file with SDL_QueueAudio
	testaudioinfo	Lists audio device capabilities
	testerror	Tests multi-threaded error handling
	testfile	Tests RWops layer
	testgl2		A very simple example of using OpenGL with SDL
	testiconv	Tests international string conversion
	testjoystick	List joysticks and watch joystick events
	testkeys	List the available keyboard keys
	testloadso	Tests the loadable library layer
	testlock	Hacked up test of multi-threading and locking
	testmultiaudio	Tests using several audio devices
	testoverlay2	Tests the overlay flickering/scaling during playback.
	testplatform	Tests types, endianness and cpu capabilities
	testsem		Tests SDL's semaphore implementation
	testshape	Tests shaped windows
	testsprite2	Example of fast sprite movement on the screen
	testthread	Hacked up test of multi-threading
	testtimer	Test the timer facilities
	testver		Check the version and dynamic loading and endianness
	testwm2		Test window manager -- title, icon, events
	torturethread	Simple test for thread creation/destruction
	controllermap   Useful to generate Game Controller API compatible maps



This directory contains sample.wav, which is a sample from Will Provost's
song, The Living Proof:

     From the album The Living Proof
     Publisher: 5 Guys Named Will
     Copyright 1996 Will Provost

You can get a copy of the full song (and album!) from iTunes...

    https://itunes.apple.com/us/album/the-living-proof/id4153978

or Amazon...

    http://www.amazon.com/The-Living-Proof-Will-Provost/dp/B00004R8RH

Thanks to Will for permitting us to distribute this sample with SDL!