libsaria: Remove app name from init data

I only have one application so there is no point in having a way to
create multiple application directories.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2013-03-24 17:09:08 -04:00 committed by Anna Schumaker
parent 14432e216d
commit f6cb19145d
6 changed files with 4 additions and 7 deletions

View File

@ -13,7 +13,7 @@ namespace libsaria
namespace app
{
void init(const string &);
void init();
void list_dir(const string &, list<string> &);
unsigned int read_numdir(const string &, void (*)(ifstream &));

View File

@ -9,7 +9,6 @@ namespace libsaria
struct initdata {
int argc;
char **argv;
string name;
void (*on_notify)(notify_t, void *);
};

View File

@ -147,10 +147,10 @@ namespace libsaria
remove(f.c_str());
}
void app::init(const string &name)
void app::init()
{
string home = getenv("HOME");
appdir = home + "/." + name;
appdir = home + "/.ocarina";
#ifdef DEBUG
appdir += "-debug";
#endif

View File

@ -25,7 +25,7 @@ namespace libsaria
srand( time(NULL) );
println("Initializing libsaria");
app::init(init->name);
app::init();
prefs::init();
audio::init(init->argc, init->argv);

View File

@ -21,7 +21,6 @@ int main(int argc, char **argv)
struct libsaria::initdata ls_init = {
argc,
argv,
"ocarina",
on_notify,
};

View File

@ -159,7 +159,6 @@ int main(int argc, char **argv)
struct libsaria::initdata ls_init = {
argc,
argv,
"ocarina", /* app name */
on_notify, /* notification handler */
};
println("Ocarina " + vers_str());