libsaria: Remove flags from initdata
I wasn't doing anything with these, so they're just getting in the way and increasing complexity. This change also allows me to remove the "enabled" variable from the idle queue. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
59b79b6575
commit
681aa4b611
|
@ -12,7 +12,6 @@ namespace libsaria
|
|||
void run_task();
|
||||
void queue_task(IdleTask *, bool);
|
||||
void cancel_all(void *);
|
||||
void enable();
|
||||
float progress();
|
||||
|
||||
};
|
||||
|
|
|
@ -3,18 +3,11 @@
|
|||
|
||||
#include <libsaria/track.h>
|
||||
|
||||
enum LibsariaFlags {
|
||||
LS_NONE = (0),
|
||||
LS_ENABLE_IDLE = (1 << 0),
|
||||
LS_ENABLE_PIPE = (1 << 1),
|
||||
};
|
||||
|
||||
namespace libsaria
|
||||
{
|
||||
struct initdata {
|
||||
int argc;
|
||||
char **argv;
|
||||
int flags;
|
||||
string name;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <libsaria/list.h>
|
||||
#include <libsaria/print.h>
|
||||
|
||||
static bool enabled = false;
|
||||
static libsaria::List<IdleTask *> idle_queue;
|
||||
static float queued = 0.0;
|
||||
static float serviced = 0.0;
|
||||
|
@ -50,11 +49,6 @@ namespace libsaria
|
|||
*/
|
||||
void idle::queue_task(IdleTask *task, bool front)
|
||||
{
|
||||
if (enabled == false) {
|
||||
do_task(task);
|
||||
return;
|
||||
}
|
||||
|
||||
if (front == true)
|
||||
idle_queue.push_front(task);
|
||||
else
|
||||
|
@ -71,9 +65,4 @@ namespace libsaria
|
|||
}
|
||||
}
|
||||
|
||||
void idle::enable()
|
||||
{
|
||||
enabled = true;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -24,16 +24,12 @@ namespace libsaria
|
|||
app::init(init->name);
|
||||
prefs::init();
|
||||
|
||||
if (init->flags & LS_ENABLE_IDLE)
|
||||
idle::enable();
|
||||
|
||||
audio::init(init->argc, init->argv);
|
||||
libsaria::deck::init();
|
||||
libsaria::library::init();
|
||||
libsaria::deck::load_all();
|
||||
|
||||
if (init->flags & LS_ENABLE_PIPE)
|
||||
app::open_pipe();
|
||||
app::open_pipe();
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,6 @@ int main(int argc, char **argv)
|
|||
struct libsaria::initdata ls_init = {
|
||||
argc,
|
||||
argv,
|
||||
LS_ENABLE_IDLE | LS_ENABLE_PIPE,
|
||||
"ocarina", /* app name */
|
||||
};
|
||||
println("Ocarina " + vers_str());
|
||||
|
|
Loading…
Reference in New Issue