Browse Source

uiMakeCurrent no longer clears items

pull/1/head
Leonard Ritter 10 years ago
parent
commit
91b515d50f
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      oui.h

+ 4
- 2
oui.h View File

@@ -747,13 +747,15 @@ static UIcontext *ui_context = NULL;
UIcontext *uiCreateContext() {
UIcontext *ctx = (UIcontext *)malloc(sizeof(UIcontext));
memset(ctx, 0, sizeof(UIcontext));
UIcontext *oldctx = ui_context;
uiMakeCurrent(ctx);
uiClear();
uiMakeCurrent(oldctx);
return ctx;
}

void uiMakeCurrent(UIcontext *ctx) {
ui_context = ctx;
if (ui_context)
uiClear();
}

void uiDestroyContext(UIcontext *ctx) {


Loading…
Cancel
Save