projects
/
winnie
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added struct subsys so that we know each
[winnie]
/
src
/
winnie.cc
diff --git
a/src/winnie.cc
b/src/winnie.cc
index
604a5e1
..
ffbe94d
100644
(file)
--- a/
src/winnie.cc
+++ b/
src/winnie.cc
@@
-26,12
+26,18
@@
Author: Eleni Maria Stea <elene.mst@gmail.com>
#include "shalloc.h"
#include "winnie.h"
#include "shalloc.h"
#include "winnie.h"
+static Subsys *subsys;
+
bool winnie_init()
{
if(!init_shared_memory()) {
return false;
}
bool winnie_init()
{
if(!init_shared_memory()) {
return false;
}
+ if(!(subsys = (Subsys*)sh_malloc(sizeof *subsys))) {
+ return false;
+ }
+
if(!init_gfx()) {
return false;
}
if(!init_gfx()) {
return false;
}
@@
-62,6
+68,9
@@
void winnie_shutdown()
destroy_keyboard();
destroy_mouse();
destroy_text();
destroy_keyboard();
destroy_mouse();
destroy_text();
+ destroy_window_manager();
+
+ sh_free(subsys);
destroy_shared_memory();
}
destroy_shared_memory();
}
@@
-80,3
+89,8
@@
long winnie_get_time()
return (tv.tv_usec - init_tv.tv_usec) / 1000 + (tv.tv_sec - init_tv.tv_sec) * 1000;
}
return (tv.tv_usec - init_tv.tv_usec) / 1000 + (tv.tv_sec - init_tv.tv_sec) * 1000;
}
+
+Subsys *get_subsys()
+{
+ return subsys;
+}