From 3fca1d3a170ac311fc379b3128be411edc21b0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 2 Apr 2014 22:41:43 +0200 Subject: Add the SDL filesystem functions The one giving you a safe path to save data is particularly important for writing games. --- src/sdl_filesystem.erl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/sdl_filesystem.erl (limited to 'src/sdl_filesystem.erl') diff --git a/src/sdl_filesystem.erl b/src/sdl_filesystem.erl new file mode 100644 index 0000000..5dd5441 --- /dev/null +++ b/src/sdl_filesystem.erl @@ -0,0 +1,24 @@ +%% Copyright (c) 2014, Loïc Hoguin +%% +%% Permission to use, copy, modify, and/or distribute this software for any +%% purpose with or without fee is hereby granted, provided that the above +%% copyright notice and this permission notice appear in all copies. +%% +%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-module(sdl_filesystem). + +-export([get_base_path/0]). +-export([get_pref_path/2]). + +get_base_path() -> + esdl2:get_base_path(). + +get_pref_path(Org, App) -> + esdl2:get_pref_path(Org, App). -- cgit v1.2.3