+3
-1
bite.c
+3
-1
bite.c
···
683
683
684
684
BITE_RESULT _init_context(be_Context* ctx, const be_Config* conf) {
685
685
if (_init_window(&(ctx->window), conf) != BITE_OK) return BITE_ERROR;
686
+
#if defined(_WIN32)
687
+
SetWindowLongPtr(ctx->window.handle, GWLP_USERDATA, (LONG_PTR)ctx);
688
+
#endif
686
689
if (_init_render(&(ctx->render), &(ctx->window), conf) != BITE_OK) return BITE_ERROR;
687
690
be_Render* render = &(ctx->render);
688
691
glGenVertexArrays(1, &(render->vao));
···
754
757
);
755
758
return BITE_ERROR;
756
759
}
757
-
SetWindowLongPtr(handle, GWLP_USERDATA, (LONG_PTR)window);
758
760
window->handle = handle;
759
761
window->dev_context = GetDC(handle);
760
762