Cleanup
This commit is contained in:
@@ -1107,6 +1107,7 @@ void android_main(struct android_app *application) {
|
|||||||
void iron_init(iron_window_options_t *win) {
|
void iron_init(iron_window_options_t *win) {
|
||||||
iron_mutex_init(&unicode_mutex);
|
iron_mutex_init(&unicode_mutex);
|
||||||
gpu_init(win->depth_bits, true);
|
gpu_init(win->depth_bits, true);
|
||||||
|
android_check_permissions();
|
||||||
#ifdef WITH_GAMEPAD
|
#ifdef WITH_GAMEPAD
|
||||||
iron_internal_gamepad_trigger_connect(0);
|
iron_internal_gamepad_trigger_connect(0);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -912,7 +912,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void iron_init(iron_window_options_t *win) {
|
void iron_init(iron_window_options_t *ops) {
|
||||||
initKeyTranslation();
|
initKeyTranslation();
|
||||||
for (int i = 0; i < 256; ++i) {
|
for (int i = 0; i < 256; ++i) {
|
||||||
keyPressed[i] = false;
|
keyPressed[i] = false;
|
||||||
@@ -933,8 +933,13 @@ void iron_init(iron_window_options_t *win) {
|
|||||||
keyPressed[i] = false;
|
keyPressed[i] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
iron_set_app_name(win->title);
|
iron_set_app_name(ops->title);
|
||||||
iron_window_create(win);
|
iron_window_create(ops);
|
||||||
|
|
||||||
|
// Maximized window has x < -1, prevent window centering
|
||||||
|
if (ops->x < -1 && ops->y < -1) {
|
||||||
|
iron_window_move(ops->x, ops->y);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef WITH_GAMEPAD
|
#ifdef WITH_GAMEPAD
|
||||||
loadXInput();
|
loadXInput();
|
||||||
|
|||||||
@@ -652,22 +652,10 @@ void _iron_init(iron_window_options_t *ops) {
|
|||||||
iron_set_copy_callback(_copy, NULL);
|
iron_set_copy_callback(_copy, NULL);
|
||||||
iron_set_paste_callback(_paste, NULL);
|
iron_set_paste_callback(_paste, NULL);
|
||||||
iron_keyboard_set_key_press_callback(_key_press, NULL);
|
iron_keyboard_set_key_press_callback(_key_press, NULL);
|
||||||
|
|
||||||
#ifdef IRON_WINDOWS
|
|
||||||
// Maximized window has x < -1, prevent window centering
|
|
||||||
if (ops->x < -1 && ops->y < -1) {
|
|
||||||
iron_window_move(ops->x, ops->y);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef WITH_AUDIO
|
#ifdef WITH_AUDIO
|
||||||
iron_a1_init();
|
iron_a1_init();
|
||||||
iron_a2_init();
|
iron_a2_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IRON_ANDROID
|
|
||||||
android_check_permissions();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void _iron_set_update_callback(void (*callback)(void)) {
|
void _iron_set_update_callback(void (*callback)(void)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user