mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
* move GL init to main thread
* fix potential bug causing the screen bitmap to be created twice
This commit is contained in:
@ -32,7 +32,7 @@ void *uiAlloc(size_t size, const char *type)
|
||||
{
|
||||
byteArray *out;
|
||||
|
||||
out = new byteArray(size, 0);
|
||||
out = new byteArray(size, 0);//printf("alloc %s at %08X\n", type, rawBytes(out));
|
||||
heap[rawBytes(out)] = out;
|
||||
types[out] = type;
|
||||
return rawBytes(out);
|
||||
|
@ -120,7 +120,14 @@ void uiGLFreeContext(uiGLContext* ctx)
|
||||
|
||||
void uiGLMakeContextCurrent(uiGLContext* ctx)
|
||||
{
|
||||
wglMakeCurrent(ctx->dc, ctx->rc);
|
||||
if (ctx == NULL)
|
||||
{
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (wglGetCurrentContext() == ctx->rc) return;
|
||||
int res = wglMakeCurrent(ctx->dc, ctx->rc);
|
||||
}
|
||||
|
||||
void *uiGLGetProcAddress(const char* proc)
|
||||
|
Reference in New Issue
Block a user