add some comments to main
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "hiisi.h"
|
||||
|
||||
#include "hiload.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <atomic>
|
||||
#include <dlfcn.h>
|
||||
@@ -10,13 +12,26 @@
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
/* Hiload hotreloader is compiled as a shared library, these are the
|
||||
* only required changes for the code to successfully reload */
|
||||
|
||||
// Init hiload
|
||||
const char *himodules[] = {"", "libhiisi-engine.so"};
|
||||
hi_init(2, himodules);
|
||||
|
||||
HiisiEngine hiisi;
|
||||
|
||||
hiisi.init(argc, argv);
|
||||
while (hiisi.event()) {
|
||||
hiisi.iterate();
|
||||
|
||||
// Reload changes
|
||||
hi_reload();
|
||||
}
|
||||
|
||||
hiisi.quit();
|
||||
|
||||
// Deinit hiload
|
||||
hi_deinit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user