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:
parent
14432e216d
commit
f6cb19145d
|
@ -13,7 +13,7 @@ namespace libsaria
|
||||||
namespace app
|
namespace app
|
||||||
{
|
{
|
||||||
|
|
||||||
void init(const string &);
|
void init();
|
||||||
|
|
||||||
void list_dir(const string &, list<string> &);
|
void list_dir(const string &, list<string> &);
|
||||||
unsigned int read_numdir(const string &, void (*)(ifstream &));
|
unsigned int read_numdir(const string &, void (*)(ifstream &));
|
||||||
|
|
|
@ -9,7 +9,6 @@ namespace libsaria
|
||||||
struct initdata {
|
struct initdata {
|
||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
string name;
|
|
||||||
void (*on_notify)(notify_t, void *);
|
void (*on_notify)(notify_t, void *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -147,10 +147,10 @@ namespace libsaria
|
||||||
remove(f.c_str());
|
remove(f.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void app::init(const string &name)
|
void app::init()
|
||||||
{
|
{
|
||||||
string home = getenv("HOME");
|
string home = getenv("HOME");
|
||||||
appdir = home + "/." + name;
|
appdir = home + "/.ocarina";
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
appdir += "-debug";
|
appdir += "-debug";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace libsaria
|
||||||
srand( time(NULL) );
|
srand( time(NULL) );
|
||||||
println("Initializing libsaria");
|
println("Initializing libsaria");
|
||||||
|
|
||||||
app::init(init->name);
|
app::init();
|
||||||
prefs::init();
|
prefs::init();
|
||||||
|
|
||||||
audio::init(init->argc, init->argv);
|
audio::init(init->argc, init->argv);
|
||||||
|
|
|
@ -21,7 +21,6 @@ int main(int argc, char **argv)
|
||||||
struct libsaria::initdata ls_init = {
|
struct libsaria::initdata ls_init = {
|
||||||
argc,
|
argc,
|
||||||
argv,
|
argv,
|
||||||
"ocarina",
|
|
||||||
on_notify,
|
on_notify,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,6 @@ int main(int argc, char **argv)
|
||||||
struct libsaria::initdata ls_init = {
|
struct libsaria::initdata ls_init = {
|
||||||
argc,
|
argc,
|
||||||
argv,
|
argv,
|
||||||
"ocarina", /* app name */
|
|
||||||
on_notify, /* notification handler */
|
on_notify, /* notification handler */
|
||||||
};
|
};
|
||||||
println("Ocarina " + vers_str());
|
println("Ocarina " + vers_str());
|
||||||
|
|
Loading…
Reference in New Issue