|
@@ -49,7 +49,7 @@ struct app {
|
|
|
bool show_fps;
|
|
bool show_fps;
|
|
|
struct free_glyph_atlas *fga;
|
|
struct free_glyph_atlas *fga;
|
|
|
struct cursor_render *cr;
|
|
struct cursor_render *cr;
|
|
|
- struct app_kbd_ht ckm;
|
|
|
|
|
|
|
+ struct app_kbd_ht *ckm;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
#include "free_glyph.h"
|
|
#include "free_glyph.h"
|
|
@@ -116,8 +116,9 @@ app_create(const char *win_title)
|
|
|
},
|
|
},
|
|
|
.target_fps = 120,
|
|
.target_fps = 120,
|
|
|
};
|
|
};
|
|
|
- HT_CREATE(app.ckm, 16);
|
|
|
|
|
- app.ckm.hash = ht_hash_nop;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ HT_CREATE(*app.ckm, 16);
|
|
|
|
|
+ app.ckm->hash = ht_hash_nop;
|
|
|
DA_CREATE(app.bufs);
|
|
DA_CREATE(app.bufs);
|
|
|
DA_APPEND(app.bufs, buffer_create());
|
|
DA_APPEND(app.bufs, buffer_create());
|
|
|
app.cbuf = &app.bufs.items[0];
|
|
app.cbuf = &app.bufs.items[0];
|
|
@@ -365,7 +366,7 @@ app_add_global_keybind(struct app *app, const char *keybind,
|
|
|
.func = func,
|
|
.func = func,
|
|
|
.dir = dir
|
|
.dir = dir
|
|
|
};
|
|
};
|
|
|
- HT_ISET(app->ckm, (int64_t)(key), kbd);
|
|
|
|
|
|
|
+ HT_ISET(*app->ckm, (int64_t)(key), kbd);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if ( kbd_str.data[0] == '<' ) {
|
|
if ( kbd_str.data[0] == '<' ) {
|
|
@@ -377,7 +378,7 @@ app_add_global_keybind(struct app *app, const char *keybind,
|
|
|
.func = func,
|
|
.func = func,
|
|
|
.dir = dir
|
|
.dir = dir
|
|
|
};
|
|
};
|
|
|
- HT_ISET(app->ckm, (int64_t)(key), kbd);
|
|
|
|
|
|
|
+ HT_ISET(*app->ckm, (int64_t)(key), kbd);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -421,7 +422,7 @@ app_add_global_keybind(struct app *app, const char *keybind,
|
|
|
.func = func,
|
|
.func = func,
|
|
|
.dir = dir
|
|
.dir = dir
|
|
|
};
|
|
};
|
|
|
- HT_ISET(app->ckm, (int64_t)(key) + (int64_t)(mod), kbd);
|
|
|
|
|
|
|
+ HT_ISET(*app->ckm, (int64_t)(key) + (int64_t)(mod), kbd);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
DA_DESTROY(words);
|
|
DA_DESTROY(words);
|