Merge pull request #484 from Minabsapi/master-fix-interface_memory_leak_mitigation
Hotfix: fixed memory leak in binary interface
This commit is contained in:
commit
83a3d30fa8
|
@ -69,6 +69,7 @@ static void resizeWindow_stub(u16 width, u16 height, void *sdl_ogl_screen_textur
|
|||
|
||||
static void sdl_draw_no_opengl()
|
||||
{
|
||||
// TODO Mirror the changes from POSIX CLI's main.cpp `Draw` method, if stable
|
||||
const NDSDisplayInfo &displayInfo = GPU->GetDisplayInfo();
|
||||
const size_t pixCount = GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_FRAMEBUFFER_NATIVE_HEIGHT;
|
||||
ColorspaceApplyIntensityToBuffer16<false, false>(displayInfo.nativeBuffer16[NDSDisplayID_Main], pixCount, displayInfo.backlightIntensity[NDSDisplayID_Main]);
|
||||
|
@ -79,8 +80,10 @@ static void sdl_draw_no_opengl()
|
|||
|
||||
SDL_Texture *texture = SDL_CreateTextureFromSurface(renderer, rawImage);
|
||||
SDL_FreeSurface(rawImage);
|
||||
rawImage = NULL;
|
||||
SDL_RenderCopy(renderer, texture, NULL, NULL);
|
||||
SDL_RenderPresent(renderer);
|
||||
SDL_DestroyTexture(texture);
|
||||
}
|
||||
|
||||
#ifdef INCLUDE_OPENGL_2D
|
||||
|
|
Loading…
Reference in New Issue