From ed2a4bc4400c38ecd11baccac5db328b797b5d68 Mon Sep 17 00:00:00 2001 From: pk33 Date: Thu, 14 Nov 2024 15:06:07 +0100 Subject: begin 3D rendering, basic camera controls --- src/display33.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/display33.c') diff --git a/src/display33.c b/src/display33.c index 928d4e0..c38825a 100644 --- a/src/display33.c +++ b/src/display33.c @@ -130,15 +130,10 @@ Error display33_init( void ) } - __display.surface.w = __display.mode.hdisplay; - __display.surface.h = __display.mode.vdisplay; __display.fb.size = (Size)drmData.drmCreateDumb[0].size; __display.surface.data = __display.fb.map[0]; __display.active = E33_TRUE; - free( drmData.drmRes_fbs ); - free( drmData.drmRes_encs ); - free( drmData.drmRes_conns ); return E33_EXIT_SUCCESS; } @@ -186,6 +181,9 @@ void display33_term( void ) LOGW( "Failed to close graphics device." ); } + free( drmData.drmRes_fbs ); + free( drmData.drmRes_encs ); + free( drmData.drmRes_conns ); free( drmData.drmRes_crtcs ); if( ioctl(__display.ttyFd, VT_SETMODE, &vtModeOld) < 0 ) { @@ -333,6 +331,8 @@ static Size _get_drm_connector( void ) mode->hdisplay += 10; } + __display.surface.w = mode->hdisplay; + __display.surface.h = mode->vdisplay; __display.mode = *mode; return E33_EXIT_SUCCESS; } -- cgit v1.2.3