src/window.c

changeset 68
823c03733e42
parent 65
9c44c55d327a
--- a/src/window.c	Sun Aug 11 15:43:01 2024 +0200
+++ b/src/window.c	Sun Aug 11 16:11:30 2024 +0200
@@ -35,7 +35,7 @@
 void asc_window_settings_init_defaults(AscWindowSettings* settings) {
     settings->dimensions.width = 800;
     settings->dimensions.height = 600;
-    settings->fullscreen = 0;
+    settings->fullscreen = false;
     settings->glsettings.depth_size = 24;
     settings->glsettings.vsync = 1;
     settings->glsettings.gl_major_version = 4;
@@ -169,3 +169,11 @@
     asc_context.active_window = index;
     asc_gl_context_activate(&asc_active_window->glctx);
 }
+
+unsigned int asc_window_index(Uint32 id) {
+    unsigned int i = 0;
+    for (; i < ASC_MAX_WINDOWS ; i++) {
+        if (asc_context.windows[i].id == id) break;
+    }
+    return i;
+}

mercurial