diff options
author | pk33 <pk33@pk33.space> | 2024-11-14 15:06:07 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-14 15:06:07 +0100 |
commit | ed2a4bc4400c38ecd11baccac5db328b797b5d68 (patch) | |
tree | b703749d0639f933edca4c3a78209159aa735c25 /src/display33.c | |
parent | 5a54774474f43ae29716751d6415563a59b92c7d (diff) | |
download | engine33-master.tar.gz |
Diffstat (limited to 'src/display33.c')
-rw-r--r-- | src/display33.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |